Package com.couchbase.lite.internal.exec
Class ClientTask<T>
- java.lang.Object
-
- com.couchbase.lite.internal.exec.ClientTask<T>
-
- Type Parameters:
T
- type of the value returned by the wrapped task.
public class ClientTask<T> extends java.lang.Object
Synchronous safe execution of a client task. Motto: Their failure is not our failure.I think it is ok to permit this executor pool to get very large: it is used only for Core callbacks that run client code and. There should not, therefore, be more threads here than there are Core threads (the Core thread is suspended until this task completes). That means that it shouldn't, actually, get all that big.
-
-
Constructor Summary
Constructors Constructor Description ClientTask(java.util.concurrent.Callable<T> task)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
dumpState()
void
execute()
void
execute(long timeout, java.util.concurrent.TimeUnit timeUnit)
java.lang.Exception
getFailure()
T
getResult()
-
-
-
Constructor Detail
-
ClientTask
public ClientTask(@NonNull java.util.concurrent.Callable<T> task)
-
-
Method Detail
-
dumpState
public static void dumpState()
-
execute
public void execute()
-
execute
public void execute(long timeout, @NonNull java.util.concurrent.TimeUnit timeUnit)
-
getResult
@Nullable public T getResult()
-
getFailure
@Nullable public java.lang.Exception getFailure()
-
-