Rabbit-R1/switch port/java/sources/okhttp3/internal/concurrent/Task.java
2024-05-21 17:08:36 -04:00

70 lines
3.4 KiB
Java

package okhttp3.internal.concurrent;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: Task.kt */
@Metadata(bv = {1, 0, 3}, d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0010\t\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u0004\b&\u0018\u00002\u00020\u0001B\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\u0015\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0011\u001a\u00020\u0012H\u0000¢\u0006\u0002\b\u0019J\b\u0010\u001a\u001a\u00020\fH&J\b\u0010\u001b\u001a\u00020\u0003H\u0016R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u001a\u0010\u000b\u001a\u00020\fX\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\r\u0010\u000e\"\u0004\b\u000f\u0010\u0010R\u001c\u0010\u0011\u001a\u0004\u0018\u00010\u0012X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0013\u0010\u0014\"\u0004\b\u0015\u0010\u0016¨\u0006\u001c"}, d2 = {"Lokhttp3/internal/concurrent/Task;", "", "name", "", "cancelable", "", "(Ljava/lang/String;Z)V", "getCancelable", "()Z", "getName", "()Ljava/lang/String;", "nextExecuteNanoTime", "", "getNextExecuteNanoTime$okhttp", "()J", "setNextExecuteNanoTime$okhttp", "(J)V", "queue", "Lokhttp3/internal/concurrent/TaskQueue;", "getQueue$okhttp", "()Lokhttp3/internal/concurrent/TaskQueue;", "setQueue$okhttp", "(Lokhttp3/internal/concurrent/TaskQueue;)V", "initQueue", "", "initQueue$okhttp", "runOnce", "toString", "okhttp"}, k = 1, mv = {1, 4, 0})
/* loaded from: classes3.dex */
public abstract class Task {
private final boolean cancelable;
private final String name;
private long nextExecuteNanoTime;
private TaskQueue queue;
public final boolean getCancelable() {
return this.cancelable;
}
public final String getName() {
return this.name;
}
/* renamed from: getNextExecuteNanoTime$okhttp, reason: from getter */
public final long getNextExecuteNanoTime() {
return this.nextExecuteNanoTime;
}
/* renamed from: getQueue$okhttp, reason: from getter */
public final TaskQueue getQueue() {
return this.queue;
}
public abstract long runOnce();
public final void setNextExecuteNanoTime$okhttp(long j) {
this.nextExecuteNanoTime = j;
}
public final void setQueue$okhttp(TaskQueue taskQueue) {
this.queue = taskQueue;
}
public String toString() {
return this.name;
}
public Task(String name, boolean z) {
Intrinsics.checkNotNullParameter(name, "name");
this.name = name;
this.cancelable = z;
this.nextExecuteNanoTime = -1L;
}
public /* synthetic */ Task(String str, boolean z, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? true : z);
}
public final void initQueue$okhttp(TaskQueue queue) {
Intrinsics.checkNotNullParameter(queue, "queue");
TaskQueue taskQueue = this.queue;
if (taskQueue == queue) {
return;
}
if (!(taskQueue == null)) {
throw new IllegalStateException("task is in multiple queues".toString());
}
this.queue = queue;
}
}