public class LeaderFollowersThreadPool
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_THREADPOOL_SIZE
Default thread pool size.
|
| Constructor and Description |
|---|
LeaderFollowersThreadPool()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Runnable task)
Execute given task.
|
void |
promoteLeader(java.lang.Runnable task)
Promote a new leader.
|
void |
shutdown()
Shutdown.
|
public static final int DEFAULT_THREADPOOL_SIZE
public void promoteLeader(java.lang.Runnable task)
task - task to execute by a new leader.public void execute(java.lang.Runnable task)
task - task to execute.public void shutdown()