Implements ThreadPoolExecutor used to execute concurrent tasks.
- Author
- Maciej Szewczykowski | macie.nosp@m.j@ba.nosp@m.ltrad.nosp@m..eu
- Version
- 0.1.6
- Since
- 0.1.6
◆ FramePublisher() [1/2]
eu.baltrad.dex.net.util.FramePublisher.FramePublisher |
( |
int | queueSize, |
|
|
int | corePoolSize, |
|
|
int | maxPoolSize ) |
|
inline |
◆ FramePublisher() [2/2]
eu.baltrad.dex.net.util.FramePublisher.FramePublisher |
( |
int | queueSize, |
|
|
int | corePoolSize, |
|
|
int | maxPoolSize, |
|
|
int | keepAliveTime ) |
|
inline |
Constructor
- Parameters
-
queueSize | The size of the queue to use for the thread pool executor. |
corePoolSize | The core pool size of the thread pool, i.e., the number for threads that will always be available there. |
maxPoolSize | The maximum pool size of the thread pool. Threads above the core pool size will be created up to this level when the number of tasks in the the thread pool queue reaches 'queueSize'. |
keepAliveTime | The maximum time in seconds that excess idle threads in the pool will wait for new tasks before terminating. |
◆ addTask()
void eu.baltrad.dex.net.util.FramePublisher.addTask |
( |
Runnable | task | ) |
|
|
inline |
Adds and executes task.
- Parameters
-
task | Task class implementing Runnable interface |
◆ setThreadPoolExecutor()
void eu.baltrad.dex.net.util.FramePublisher.setThreadPoolExecutor |
( |
ThreadPoolExecutor | executor | ) |
|
|
inline |
Sets the thread pool executor to use. Usable for testing purposes.
- Parameters
-
executor | The thread pool executor |
The documentation for this class was generated from the following file:
- src/java/eu/baltrad/dex/net/util/FramePublisher.java