package p138.p329.p351.p352.p354;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import p138.p329.p362.p365.C6354;

/* JADX INFO: renamed from: ދ.ށ.ކ.ހ.ބ.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C6299<V> extends AbstractFutureC6298<V> {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final AbstractFutureC6298<V> f17635;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final InterfaceC6300 f17636;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final AtomicBoolean f17637 = new AtomicBoolean(false);

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final ReentrantReadWriteLock f17638 = new ReentrantReadWriteLock();

    /* JADX INFO: renamed from: ދ.ށ.ކ.ހ.ބ.ؠ$֏, reason: contains not printable characters */
    public interface InterfaceC6300 {
    }

    public C6299(AbstractFutureC6298<V> abstractFutureC6298, InterfaceC6300 interfaceC6300) {
        this.f17635 = abstractFutureC6298;
        this.f17636 = interfaceC6300;
    }

    @Override // java.util.concurrent.Future
    public boolean cancel(boolean z) {
        this.f17638.writeLock().lock();
        try {
            if (!isDone() && !this.f17637.getAndSet(true)) {
                ((C6354.C6355) this.f17636).m9580();
                return true;
            }
            return false;
        } finally {
        }
    }

    @Override // java.util.concurrent.Future
    public V get() {
        return this.f17635.get();
    }

    @Override // java.util.concurrent.Future
    public V get(long j, TimeUnit timeUnit) {
        return this.f17635.get(j, timeUnit);
    }

    @Override // java.util.concurrent.Future
    public boolean isCancelled() {
        this.f17638.readLock().lock();
        try {
            return this.f17637.get();
        } finally {
            this.f17638.readLock().unlock();
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:9:0x001c  */
    @Override // java.util.concurrent.Future
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean isDone() {
        boolean z;
        this.f17638.readLock().lock();
        try {
            if (!this.f17637.get()) {
                z = this.f17635.isDone();
            }
            return z;
        } finally {
            this.f17638.readLock().unlock();
        }
    }
}
