66 lines
1.6 KiB
Java
66 lines
1.6 KiB
Java
|
package okhttp3.internal.concurrent;
|
||
|
|
||
|
import o.C14953gcr;
|
||
|
import o.C14957gcv;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public abstract class Task {
|
||
|
private final boolean cancelable;
|
||
|
private final String name;
|
||
|
private long nextExecuteNanoTime;
|
||
|
private TaskQueue queue;
|
||
|
|
||
|
public abstract long runOnce();
|
||
|
|
||
|
public Task(String str, boolean z) {
|
||
|
C14957gcv.e(str, "");
|
||
|
this.name = str;
|
||
|
this.cancelable = z;
|
||
|
this.nextExecuteNanoTime = -1L;
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ Task(String str, boolean z, int i, C14953gcr c14953gcr) {
|
||
|
this(str, (i & 2) != 0 ? true : z);
|
||
|
}
|
||
|
|
||
|
public final void initQueue$okhttp(TaskQueue taskQueue) {
|
||
|
C14957gcv.e(taskQueue, "");
|
||
|
TaskQueue taskQueue2 = this.queue;
|
||
|
if (taskQueue2 == taskQueue) {
|
||
|
return;
|
||
|
}
|
||
|
if (taskQueue2 != null) {
|
||
|
throw new IllegalStateException("task is in multiple queues".toString());
|
||
|
}
|
||
|
this.queue = taskQueue;
|
||
|
}
|
||
|
|
||
|
public String toString() {
|
||
|
return this.name;
|
||
|
}
|
||
|
|
||
|
public final void setQueue$okhttp(TaskQueue taskQueue) {
|
||
|
this.queue = taskQueue;
|
||
|
}
|
||
|
|
||
|
public final void setNextExecuteNanoTime$okhttp(long j) {
|
||
|
this.nextExecuteNanoTime = j;
|
||
|
}
|
||
|
|
||
|
public final TaskQueue getQueue$okhttp() {
|
||
|
return this.queue;
|
||
|
}
|
||
|
|
||
|
public final long getNextExecuteNanoTime$okhttp() {
|
||
|
return this.nextExecuteNanoTime;
|
||
|
}
|
||
|
|
||
|
public final String getName() {
|
||
|
return this.name;
|
||
|
}
|
||
|
|
||
|
public final boolean getCancelable() {
|
||
|
return this.cancelable;
|
||
|
}
|
||
|
}
|