public final class FlowEngine
extends java.util.concurrent.ScheduledThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
FlowEngine(int corePoolSize,
java.lang.String threadNamePrefix)
Creates a new instance of FlowEngine
|
FlowEngine(int corePoolSize,
java.lang.String threadNamePrefix,
boolean daemon)
Creates a new instance of FlowEngine
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(java.lang.Runnable runnable,
java.lang.Throwable throwable)
Hook method called by the thread that executed the given runnable after execution of the runnable completed.
|
protected void |
beforeExecute(java.lang.Thread thread,
java.lang.Runnable runnable)
Hook method called by the running thread whenever a runnable task is given to the thread to run.
|
protected void |
terminated()
Hook method called whenever the engine is terminated.
|
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForpublic FlowEngine(int corePoolSize,
java.lang.String threadNamePrefix)
corePoolSize - the maximum number of threads available to tasks running in the engine.threadNamePrefix - for naming the threadpublic FlowEngine(int corePoolSize,
java.lang.String threadNamePrefix,
boolean daemon)
corePoolSize - the maximum number of threads available to tasks running in the engine.threadNamePrefix - for thread namingdaemon - if true, the thread pool will be populated with daemon threads, otherwise the threads will not be marked as daemon.protected void beforeExecute(java.lang.Thread thread,
java.lang.Runnable runnable)
beforeExecute in class java.util.concurrent.ThreadPoolExecutorthread - threadrunnable - runnableprotected void afterExecute(java.lang.Runnable runnable,
java.lang.Throwable throwable)
afterExecute in class java.util.concurrent.ThreadPoolExecutorrunnable - runnablethrowable - throwableprotected void terminated()
terminated in class java.util.concurrent.ThreadPoolExecutor