package defpackage;

import java.io.Closeable;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;

/* JADX INFO: loaded from: classes2.dex */
@sw4
@ii2
@xd2
public final class c31<V> {
    public static final y65 a = new y65(c31.class);

    public interface a<V> {
    }

    public interface b<T, U> {
    }

    public static final class c extends IdentityHashMap<AutoCloseable, Executor> implements Closeable {
        public volatile boolean a;

        @Override // java.io.Closeable, java.lang.AutoCloseable
        public final void close() {
            if (this.a) {
                return;
            }
            synchronized (this) {
                try {
                    if (this.a) {
                        return;
                    }
                    this.a = true;
                    for (Map.Entry<AutoCloseable, Executor> entry : entrySet()) {
                        c31.a(entry.getKey(), entry.getValue());
                    }
                    clear();
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
    }

    public interface d<V> {
    }

    public interface e<T, U> {
    }

    @xd2
    public static class f {

        public interface a<V> {
        }

        public interface b<V> {
        }
    }

    public static final class g<V1, V2> extends f {

        public interface a<V1, V2, U> {
        }

        public interface b<V1, V2, U> {
        }
    }

    public static final class h<V1, V2, V3> extends f {

        public interface a<V1, V2, V3, U> {
        }

        public interface b<V1, V2, V3, U> {
        }
    }

    public static final class i<V1, V2, V3, V4> extends f {

        public interface a<V1, V2, V3, V4, U> {
        }

        public interface b<V1, V2, V3, V4, U> {
        }
    }

    public static final class j<V1, V2, V3, V4, V5> extends f {

        public interface a<V1, V2, V3, V4, V5, U> {
        }

        public interface b<V1, V2, V3, V4, V5, U> {
        }
    }

    public static final class k {
    }

    public static final class l {
    }

    /* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
    /* JADX WARN: Unknown enum class pattern. Please report as an issue! */
    public static final class m {
        public static final /* synthetic */ m[] a = {new m("OPEN", 0), new m("SUBSUMED", 1), new m("WILL_CLOSE", 2), new m("CLOSING", 3), new m("CLOSED", 4), new m("WILL_CREATE_VALUE_AND_CLOSER", 5)};

        /* JADX INFO: Fake field, exist only in values array */
        m EF5;

        public static m valueOf(String str) {
            return (m) Enum.valueOf(m.class, str);
        }

        public static m[] values() {
            return (m[]) a.clone();
        }
    }

    public static final class n<V> {
    }

    public interface o<V> {
    }

    public static void a(AutoCloseable autoCloseable, Executor executor) {
        if (autoCloseable == null) {
            return;
        }
        try {
            executor.execute(new r21(autoCloseable, 0));
        } catch (RejectedExecutionException e2) {
            y65 y65Var = a;
            Logger loggerA = y65Var.a();
            Level level = Level.WARNING;
            if (loggerA.isLoggable(level)) {
                y65Var.a().log(level, String.format("while submitting close to %s; will close inline", executor), (Throwable) e2);
            }
            a(autoCloseable, za2.a);
        }
    }

    public final void finalize() {
        throw null;
    }

    public final String toString() {
        p96.b(this);
        throw null;
    }
}
