-
- All Implemented Interfaces:
-
java.util.concurrent.Executor,java.util.concurrent.ExecutorService
public interface FlushableExecutorService implements ExecutorService
An ExecutorService which backing queue can be drained to a collection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceFlushableExecutorService.FactoryA Factory for a FlushableExecutorService implementation.
-
Method Summary
Modifier and Type Method Description abstract UnitdrainTo(Collection<Runnable> destination)Drains the queue backing this ExecutorService into the provided mutable collection. -
Methods inherited from class java.util.concurrent.ExecutorService
execute -
Methods inherited from class com.datadog.android.core.thread.FlushableExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
drainTo
abstract Unit drainTo(Collection<Runnable> destination)
Drains the queue backing this ExecutorService into the provided mutable collection. After this operation, the executor's queue will be empty, and all the runnable entries added to the destination won't have run yet.
- Parameters:
destination- the collection into which Runnable in the queue should be drained to.
-
-
-
-