Example usage for Java com.google.common.util.concurrent MoreExecutors fields, constructors, methods, implement or subclass
The text is from its open source code.
Executor | directExecutor() Returns an Executor that runs each task in the thread that invokes Executor#execute execute , as in CallerRunsPolicy . |
ExecutorService | getExitingExecutorService(ThreadPoolExecutor executor) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete. |
ExecutorService | getExitingExecutorService(ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ThreadPoolExecutor into an ExecutorService that exits when the application is complete. |
ScheduledExecutorService | getExitingScheduledExecutorService( ScheduledThreadPoolExecutor executor) Converts the given ThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete. |
ScheduledExecutorService | getExitingScheduledExecutorService(ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) Converts the given ScheduledThreadPoolExecutor into a ScheduledExecutorService that exits when the application is complete. |
ListeningExecutorService | listeningDecorator(ExecutorService delegate) Creates an ExecutorService whose submit and invokeAll methods submit ListenableFutureTask instances to the given delegate executor. |
ListeningScheduledExecutorService | listeningDecorator(ScheduledExecutorService delegate) Creates a ScheduledExecutorService whose submit and invokeAll methods submit ListenableFutureTask instances to the given delegate executor. |
ListeningExecutorService | newDirectExecutorService() Creates an executor service that runs each task in the thread that invokes execute/submit , as in CallerRunsPolicy This applies both to individually submitted tasks and to collections of tasks submitted via invokeAll or invokeAny . |
ThreadFactory | platformThreadFactory() Returns a default thread factory used to create new threads. |
ListeningExecutorService | sameThreadExecutor() Creates an executor service that runs each task in the thread that invokes execute/submit , as in CallerRunsPolicy . |
boolean | shutdownAndAwaitTermination(ExecutorService service, long timeout, TimeUnit unit) Shuts down the given executor gradually, first disabling new submissions and later cancelling existing tasks. |