public interface ExecutorFactory
Two Executors are required. The getLongLivedExecutor()
is used for message processing and the
getShortLivedExecutor()
is used for timer tasks. They can both be the same underlying Executor if desired.
Separating them allows for additional control such as with a ResourceAdapter WorkManager where the WorkManager
differentiates between short and long lived Work.
By way of example, a single Executors.newCachedThreadPool()
satisfies the requirements but really adds
nothing over the default behavior.
Modifier and Type | Method and Description |
---|---|
Executor |
getLongLivedExecutor()
The message processing activities are long-lived so this Executor must have sufficient distinct Threads available
to handle all your Sessions.
|
Executor |
getShortLivedExecutor()
The timer tasks are short-lived and only require one Thread (calls are serialized).
|
Executor getLongLivedExecutor()
Executor getShortLivedExecutor()
Copyright © 2021. All rights reserved.