public class DelayedTaskQueue extends Object implements Serializable
| Constructor and Description |
|---|
DelayedTaskQueue(int threadCount,
String threadName,
String executorPoolName,
int delay)
Instantiates a new delayed task queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(Runnable r)
Adds the task for delayed execution
|
int |
getDelay()
Gets the delay.
|
String |
getExecutorPoolName()
Gets the executor pool name.
|
Random |
getRANDOM()
Gets the random number
|
protected BlockingDeque<Runnable> |
getRESOURCE_RUNNABLES()
Gets the resource runnables which needs to be submitted
|
ExecutorService |
getService()
Gets the service.
|
String |
getThreadName()
Gets the thread name.
|
void |
init()
Inits the
|
void |
shutdown()
Shutdown the thread
|
public void init()
public void addTask(Runnable r)
r - the rpublic void shutdown()
protected BlockingDeque<Runnable> getRESOURCE_RUNNABLES()
public int getDelay()
public String getExecutorPoolName()
public ExecutorService getService()
public String getThreadName()
public Random getRANDOM()
Copyright © 2015. All rights reserved.