package com.bykv.vk.openvk.preload.a;

import java.util.concurrent.atomic.AtomicLong;

/* JADX INFO: loaded from: classes.dex */
public abstract class d<IN, OUT> {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private static AtomicLong f5942d = new AtomicLong();

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    d f5943a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    IN f5944b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    OUT f5945c;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private com.bykv.vk.openvk.preload.a.b.a f5946e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private b f5947f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private long f5948g;

    public abstract Object a(b<OUT> bVar, IN in) throws Throwable;

    public void a(Object... objArr) {
    }

    public final long b() {
        return this.f5948g;
    }

    public final void c() {
        com.bykv.vk.openvk.preload.a.b.a aVar = this.f5946e;
        if (aVar == null) {
            return;
        }
        aVar.a(this.f5947f, this);
    }

    public final void d() {
        com.bykv.vk.openvk.preload.a.b.a aVar = this.f5946e;
        if (aVar == null) {
            return;
        }
        aVar.c(this.f5947f, this);
    }

    public final void e() {
        com.bykv.vk.openvk.preload.a.b.a aVar = this.f5946e;
        if (aVar == null) {
            return;
        }
        aVar.b(this.f5947f, this);
    }

    public final OUT f() {
        return this.f5945c;
    }

    public final void a(b bVar, d dVar, IN in, com.bykv.vk.openvk.preload.a.b.a aVar, Object[] objArr) {
        this.f5947f = new m(bVar);
        this.f5943a = dVar;
        this.f5944b = in;
        this.f5946e = aVar;
        if (dVar != null) {
            this.f5948g = dVar.f5948g;
        } else {
            long andIncrement = f5942d.getAndIncrement();
            this.f5948g = andIncrement;
            if (andIncrement < 0) {
                throw new RuntimeException("Pipeline ID use up!");
            }
        }
        a(objArr);
    }

    public final void b(Throwable th) {
        com.bykv.vk.openvk.preload.a.b.a aVar = this.f5946e;
        if (aVar == null) {
            return;
        }
        aVar.a(this.f5947f, this, th);
    }

    public final void c(Throwable th) {
        com.bykv.vk.openvk.preload.a.b.a aVar = this.f5946e;
        if (aVar == null) {
            return;
        }
        aVar.b(this.f5947f, this, th);
    }

    public final void d(Throwable th) {
        com.bykv.vk.openvk.preload.a.b.a aVar = this.f5946e;
        if (aVar == null) {
            return;
        }
        aVar.c(this.f5947f, this, th);
    }
}
