mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-17 03:17:17 +01:00
91 lines
5 KiB
Java
91 lines
5 KiB
Java
package androidx.room;
|
|
|
|
import androidx.annotation.RestrictTo;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import kotlin.Metadata;
|
|
import kotlin.coroutines.ContinuationInterceptor;
|
|
import kotlin.coroutines.CoroutineContext;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0003\b\u0001\u0018\u0000 \u00102\u00020\u0001:\u0001\u0010B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0006\u0010\r\u001a\u00020\u000eJ\u0006\u0010\u000f\u001a\u00020\u000eR\u001a\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00000\u00068VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0007\u0010\bR\u000e\u0010\t\u001a\u00020\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0002\u001a\u00020\u0003X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\f¨\u0006\u0011"}, d2 = {"Landroidx/room/TransactionElement;", "Lkotlin/coroutines/CoroutineContext$Element;", "transactionDispatcher", "Lkotlin/coroutines/ContinuationInterceptor;", "(Lkotlin/coroutines/ContinuationInterceptor;)V", "key", "Lkotlin/coroutines/CoroutineContext$Key;", "getKey", "()Lkotlin/coroutines/CoroutineContext$Key;", "referenceCount", "Ljava/util/concurrent/atomic/AtomicInteger;", "getTransactionDispatcher$room_ktx_release", "()Lkotlin/coroutines/ContinuationInterceptor;", "acquire", "", "release", "Key", "room-ktx_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
/* loaded from: classes14.dex */
|
|
public final class TransactionElement implements CoroutineContext.Element {
|
|
|
|
/* renamed from: Key, reason: from kotlin metadata */
|
|
@NotNull
|
|
public static final Companion INSTANCE = new Companion(null);
|
|
|
|
@NotNull
|
|
private final AtomicInteger referenceCount = new AtomicInteger(0);
|
|
|
|
@NotNull
|
|
private final ContinuationInterceptor transactionDispatcher;
|
|
|
|
public TransactionElement(@NotNull ContinuationInterceptor continuationInterceptor) {
|
|
this.transactionDispatcher = continuationInterceptor;
|
|
}
|
|
|
|
public final void acquire() {
|
|
this.referenceCount.incrementAndGet();
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
|
|
public <R> R fold(R r, @NotNull Function2<? super R, ? super CoroutineContext.Element, ? extends R> function2) {
|
|
return (R) CoroutineContext.Element.DefaultImpls.fold(this, r, function2);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
|
|
@Nullable
|
|
public <E extends CoroutineContext.Element> E get(@NotNull CoroutineContext.Key<E> key) {
|
|
return (E) CoroutineContext.Element.DefaultImpls.get(this, key);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element
|
|
@NotNull
|
|
public CoroutineContext.Key<TransactionElement> getKey() {
|
|
return INSTANCE;
|
|
}
|
|
|
|
@NotNull
|
|
/* renamed from: getTransactionDispatcher$room_ktx_release, reason: from getter */
|
|
public final ContinuationInterceptor getTransactionDispatcher() {
|
|
return this.transactionDispatcher;
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext.Element, kotlin.coroutines.CoroutineContext
|
|
@NotNull
|
|
public CoroutineContext minusKey(@NotNull CoroutineContext.Key<?> key) {
|
|
return CoroutineContext.Element.DefaultImpls.minusKey(this, key);
|
|
}
|
|
|
|
@Override // kotlin.coroutines.CoroutineContext
|
|
@NotNull
|
|
public CoroutineContext plus(@NotNull CoroutineContext coroutineContext) {
|
|
return CoroutineContext.Element.DefaultImpls.plus(this, coroutineContext);
|
|
}
|
|
|
|
public final void release() {
|
|
if (this.referenceCount.decrementAndGet() >= 0) {
|
|
return;
|
|
}
|
|
Single$$ExternalSyntheticBUOutline0.m$2("Transaction was never started or was already released.");
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Landroidx/room/TransactionElement$Key;", "Lkotlin/coroutines/CoroutineContext$Key;", "Landroidx/room/TransactionElement;", "()V", "room-ktx_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* renamed from: androidx.room.TransactionElement$Key, reason: from kotlin metadata */
|
|
public static final class Companion implements CoroutineContext.Key<TransactionElement> {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
}
|