public class ThreadPoolActionEngine extends AbstractActionEngine
ActionEngine
based on ScheduledThreadPoolExecutor
.Modifier and Type | Class and Description |
---|---|
class |
ThreadPoolActionEngine.ThreadPoolContext<T>
Thread pool context.
|
executorService, TERMINATION_TIMEOUT
Constructor and Description |
---|
ThreadPoolActionEngine(int corePoolSize)
Creates a new instance of ThreadPoolActionEngine with the supplied core pool size.
|
Modifier and Type | Method and Description |
---|---|
<T> ThreadPoolActionEngine.ThreadPoolContext<T> |
newContext(Action<T> action)
Creates an action context to define how the action will be scheduled for execution.
|
awaitResumed, getBindings, isPaused, isStopped, pause, resume, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
putInBindings, removeFromBindings, schedule, schedule
public ThreadPoolActionEngine(int corePoolSize)
corePoolSize
- Number of threads to process actions using.public <T> ThreadPoolActionEngine.ThreadPoolContext<T> newContext(Action<T> action)
ActionEngine
action
- Action to create context for.