Package org.apache.flink.util.concurrent
Class Executors
- java.lang.Object
-
- org.apache.flink.util.concurrent.Executors
-
public class Executors extends Object
Collection ofExecutorandExecutorServiceimplementations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ExecutordirectExecutor()Return a direct executor.static ExecutorServicenewDirectExecutorService()Creates a moreExecutorServicethat runs the passed task in the calling thread.static ExecutorServicenewDirectExecutorServiceWithNoOpShutdown()Creates a newExecutorServicethat runs the passed tasks in the calling thread but doesn't implement proper shutdown behavior.
-
-
-
Method Detail
-
directExecutor
public static Executor directExecutor()
Return a direct executor. The direct executor directly executes the runnable in the calling thread.- Returns:
- Direct executor
-
newDirectExecutorService
public static ExecutorService newDirectExecutorService()
Creates a moreExecutorServicethat runs the passed task in the calling thread.
-
newDirectExecutorServiceWithNoOpShutdown
public static ExecutorService newDirectExecutorServiceWithNoOpShutdown()
Creates a newExecutorServicethat runs the passed tasks in the calling thread but doesn't implement proper shutdown behavior. Tasks can be still submitted even afterExecutorService.shutdown()is called.- See Also:
newDirectExecutorService()
-
-