Package com.couchbase.lite.internal.exec
Interface ExecutionService.CloseableExecutor
-
- All Superinterfaces:
Executor
- Enclosing interface:
- ExecutionService
public static interface ExecutionService.CloseableExecutor extends Executor
Like an ExecutorService, but simpler. It is not up to the client to decide whether to terminate the backing Executor or not. They simply get to say that they are done with it
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ExecutionService.CloseableExecutor.ExecutorClosedException
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
stop(long timeout, TimeUnit unit)
The executor will accept no more tasks.
-
-
-
Method Detail
-
stop
boolean stop(long timeout, @NonNull TimeUnit unit)
The executor will accept no more tasks. It will complete executing all currently enqueued tasks, if possible. This method will return when all tasks have run or when the timeout elapses, whichever comes first.- Parameters:
timeout
- time to wait for shutdownunit
- time unit for shutdown wait- Returns:
- true if all scheduled tasks have been completed
-
-