package o; import java.util.Collection; import java.util.Set; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import o.YPs; /* renamed from: o.yKQ, reason: case insensitive filesystem */ /* loaded from: classes2.dex */ public final class C17610yKQ implements vVy { private final vVy d; private final pKi>> e = new pKi<>(5); private final ReadWriteLock b = new ReentrantReadWriteLock(); public C17610yKQ(vVy vvy) { this.d = vvy; } @Override // o.vVy public final void b(Collection collection) { this.d.b(collection); this.e.evictAll(); } @Override // o.vVy public final void a() { this.d.a(); this.e.evictAll(); } @Override // o.vVy public final Set> a(double d) { int i = (int) d; Set> a = a(i); int i2 = i + 1; if (this.e.get(Integer.valueOf(i2)) == null) { new Thread(new IeS(this, i2)).start(); } int i3 = i - 1; if (this.e.get(Integer.valueOf(i3)) == null) { new Thread(new IeS(this, i3)).start(); } return a; } @Override // o.vVy public final int c() { return this.d.c(); } final Set> a(int i) { this.b.readLock().lock(); Set> set = this.e.get(Integer.valueOf(i)); this.b.readLock().unlock(); if (set == null) { this.b.writeLock().lock(); set = this.e.get(Integer.valueOf(i)); if (set == null) { set = this.d.a(i); this.e.put(Integer.valueOf(i), set); } this.b.writeLock().unlock(); } return set; } /* renamed from: o.yKQ$IeS */ /* loaded from: classes2.dex */ class IeS implements Runnable { private C17610yKQ a; private final int c; public IeS(C17610yKQ c17610yKQ, int i) { this.a = c17610yKQ; this.c = i; } @Override // java.lang.Runnable public final void run() { try { Thread.sleep((long) ((Math.random() * 500.0d) + 500.0d)); } catch (InterruptedException unused) { } this.a.a(this.c); } } }