63 lines
2.1 KiB
Java
63 lines
2.1 KiB
Java
package c.f.j.c;
|
|
|
|
import c.f.d.e.a;
|
|
import com.facebook.cache.common.CacheKey;
|
|
import com.facebook.common.memory.PooledByteBuffer;
|
|
import com.facebook.common.references.CloseableReference;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.Callable;
|
|
import java.util.concurrent.CancellationException;
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
/* compiled from: BufferedDiskCache */
|
|
public class e implements Callable<c.f.j.j.e> {
|
|
public final /* synthetic */ AtomicBoolean i;
|
|
public final /* synthetic */ CacheKey j;
|
|
public final /* synthetic */ f k;
|
|
|
|
public e(f fVar, Object obj, AtomicBoolean atomicBoolean, CacheKey cacheKey) {
|
|
this.k = fVar;
|
|
this.i = atomicBoolean;
|
|
this.j = cacheKey;
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
@Override // java.util.concurrent.Callable
|
|
public c.f.j.j.e call() throws Exception {
|
|
if (!this.i.get()) {
|
|
c.f.j.j.e a = this.k.f.a(this.j);
|
|
if (a != null) {
|
|
this.j.b();
|
|
int i = a.a;
|
|
Objects.requireNonNull((z) this.k.g);
|
|
} else {
|
|
this.j.b();
|
|
int i2 = a.a;
|
|
Objects.requireNonNull((z) this.k.g);
|
|
a = null;
|
|
try {
|
|
PooledByteBuffer a2 = f.a(this.k, this.j);
|
|
if (a2 == null) {
|
|
return a;
|
|
}
|
|
CloseableReference C = CloseableReference.C(a2);
|
|
try {
|
|
a = new c.f.j.j.e(C);
|
|
} finally {
|
|
if (C != null) {
|
|
C.close();
|
|
}
|
|
}
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
if (Thread.interrupted()) {
|
|
a.i(f.class, "Host thread was interrupted, decreasing reference count");
|
|
a.close();
|
|
throw new InterruptedException();
|
|
}
|
|
return a;
|
|
}
|
|
throw new CancellationException();
|
|
}
|
|
}
|