package com.ironsource;

import com.brentvatne.react.ReactVideoView;
import com.google.gson.reflect.VR.KSeeLS;
import com.ironsource.y8;
import com.mbridge.msdk.foundation.download.core.DownloadCommon;
import java.util.concurrent.ConcurrentHashMap;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0000\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u000f\u001a\u00020\r¢\u0006\u0004\b\u0017\u0010\u0018J\u0018\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0004H\u0016J\u0014\u0010\u0007\u001a\u00060\u0002j\u0002`\b2\u0006\u0010\u0005\u001a\u00020\u0004H\u0016J\u0019\u0010\n\u001a\u0004\u0018\u00010\t2\u0006\u0010\u0005\u001a\u00020\u0004H\u0016¢\u0006\u0004\b\n\u0010\u000bJ\u0018\u0010\u0007\u001a\u00020\u00062\u0006\u0010\f\u001a\u00020\t2\u0006\u0010\u0005\u001a\u00020\u0004H\u0016R\u0014\u0010\u000f\u001a\u00020\r8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0007\u0010\u000eR*\u0010\u0013\u001a\u0016\u0012\b\u0012\u00060\u0004j\u0002`\u0011\u0012\b\u0012\u00060\u0002j\u0002`\b0\u00108\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\n\u0010\u0012R*\u0010\u0016\u001a\u0016\u0012\b\u0012\u00060\u0004j\u0002`\u0011\u0012\b\u0012\u00060\tj\u0002`\u00140\u00108\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0015\u0010\u0012¨\u0006\u0019"}, d2 = {"Lcom/ironsource/es;", "Lcom/ironsource/bh;", "", "count", "", ReactVideoView.EVENT_PROP_METADATA_IDENTIFIER, "", "a", "Lcom/ironsource/services/capping/showcount/ShowCount;", "", DownloadCommon.DOWNLOAD_REPORT_FIND_FILE_RESULT_VALUE_B, "(Ljava/lang/String;)Ljava/lang/Long;", "threshold", "Lcom/ironsource/d8;", "Lcom/ironsource/d8;", y8.a.j, "Ljava/util/concurrent/ConcurrentHashMap;", "Lcom/ironsource/services/capping/Identifier;", "Ljava/util/concurrent/ConcurrentHashMap;", "showCountCache", "Lcom/ironsource/services/capping/showcount/TimeThreshold;", "c", "timeThresholdCache", "<init>", "(Lcom/ironsource/d8;)V", "mediationsdk_release"}, k = 1, mv = {1, 8, 0})
/* loaded from: classes7.dex */
public final class es implements bh {

    /* renamed from: a  reason: collision with root package name */
    private final d8 f2318a;
    private ConcurrentHashMap<String, Integer> b;
    private ConcurrentHashMap<String, Long> c;

    public es(d8 storage) {
        Intrinsics.checkNotNullParameter(storage, "storage");
        this.f2318a = storage;
        this.b = new ConcurrentHashMap<>();
        this.c = new ConcurrentHashMap<>();
    }

    @Override // com.ironsource.bh
    public int a(String identifier) {
        Intrinsics.checkNotNullParameter(identifier, "identifier");
        Integer num = this.b.get(identifier);
        if (num != null) {
            return num.intValue();
        }
        Integer c = this.f2318a.c(identifier);
        if (c == null) {
            this.b.put(identifier, 0);
            return 0;
        }
        int intValue = c.intValue();
        this.b.put(identifier, Integer.valueOf(intValue));
        return intValue;
    }

    @Override // com.ironsource.bh
    public void a(int i, String str) {
        Intrinsics.checkNotNullParameter(str, KSeeLS.ucSOVjICkYUQBN);
        this.b.put(str, Integer.valueOf(i));
        this.f2318a.a(str, i);
    }

    @Override // com.ironsource.bh
    public void a(long j, String identifier) {
        Intrinsics.checkNotNullParameter(identifier, "identifier");
        this.c.put(identifier, Long.valueOf(j));
        this.f2318a.a(identifier, j);
    }

    @Override // com.ironsource.bh
    public Long b(String identifier) {
        Intrinsics.checkNotNullParameter(identifier, "identifier");
        Long l = this.c.get(identifier);
        if (l != null) {
            return l;
        }
        Long a2 = this.f2318a.a(identifier);
        if (a2 != null) {
            long longValue = a2.longValue();
            this.c.put(identifier, Long.valueOf(longValue));
            return Long.valueOf(longValue);
        }
        return null;
    }
}
