|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RunnableManager
The RunnableManager interface describes the functionality of an implementation running commands in the background.
Field Summary | |
---|---|
static String |
ROLE
The role name |
Method Summary | |
---|---|
ThreadPool |
createPool(int queueSize,
int maxPoolSize,
int minPoolSize,
int priority,
boolean isDaemon,
long keepAliveTime,
String blockPolicy,
boolean shutdownGraceful,
int shutdownWaitTime)
Create a private ThreadPool with a specific ThreadFactory |
void |
createPool(String name,
int queueSize,
int maxPoolSize,
int minPoolSize,
int priority,
boolean isDaemon,
long keepAliveTime,
String blockPolicy,
boolean shutdownGraceful,
int shutdownWaitTime)
Create a shared ThreadPool with a specific ThreadFactory |
void |
execute(Runnable command)
Immediate Execution of a runnable in the background |
void |
execute(Runnable command,
long delay)
Immediate Execution of a runnable in the background |
void |
execute(Runnable command,
long delay,
long interval)
Immediate Execution of a runnable in the background |
void |
execute(String threadPoolName,
Runnable command)
Immediate Execution of a runnable in the background |
void |
execute(String threadPoolName,
Runnable command,
long delay)
Immediate Execution of a runnable in the background |
void |
execute(String threadPoolName,
Runnable command,
long delay,
long interval)
Delayed and repeated Execution of a runnable in the background |
void |
remove(Runnable command)
Remove a Runnable from the execution stack |
Field Detail |
---|
static final String ROLE
Method Detail |
---|
void createPool(String name, int queueSize, int maxPoolSize, int minPoolSize, int priority, boolean isDaemon, long keepAliveTime, String blockPolicy, boolean shutdownGraceful, int shutdownWaitTime)
ThreadFactory
name
- The name of the thread poolqueueSize
- The size of the queuemaxPoolSize
- The maximum number of threadsminPoolSize
- The maximum number of threadspriority
- The priority of threads created by this pool. This is
one of Thread.MIN_PRIORITY
, Thread.NORM_PRIORITY
, or Thread.MAX_PRIORITY
isDaemon
- Whether or not thread from the pool should run in daemon
modekeepAliveTime
- How long should a thread be alive for new work to
be done before it is GCedblockPolicy
- What's the blocking policy is resources are exhaustedshutdownGraceful
- Should we wait for the queue to finish all
pending commands?shutdownWaitTime
- After what time a normal shutdown should take
into account if a graceful shutdown has not come to an endThreadPool createPool(int queueSize, int maxPoolSize, int minPoolSize, int priority, boolean isDaemon, long keepAliveTime, String blockPolicy, boolean shutdownGraceful, int shutdownWaitTime)
ThreadFactory
queueSize
- The size of the queuemaxPoolSize
- The maximum number of threadsminPoolSize
- The maximum number of threadspriority
- The priority of threads created by this pool. This is
one of Thread.MIN_PRIORITY
, Thread.NORM_PRIORITY
, or Thread.MAX_PRIORITY
isDaemon
- Whether or not thread from the pool should run in daemon
modekeepAliveTime
- How long should a thread be alive for new work to
be done before it is GCedblockPolicy
- What's the blocking policy is resources are exhaustedshutdownGraceful
- Should we wait for the queue to finish all
pending commands?shutdownWaitTime
- After what time a normal shutdown should take
into account if a graceful shutdown has not come to an end
ThreadPool
void execute(Runnable command)
command
- The command to executevoid execute(Runnable command, long delay)
command
- The command to executedelay
- The delay before first runvoid execute(Runnable command, long delay, long interval)
command
- The command to executedelay
- The delay before first runinterval
- The interval of repeated runsvoid execute(String threadPoolName, Runnable command)
threadPoolName
- The thread pool to usecommand
- The command to executevoid execute(String threadPoolName, Runnable command, long delay)
threadPoolName
- The thread pool to usecommand
- The command to executedelay
- The delay before first runvoid execute(String threadPoolName, Runnable command, long delay, long interval)
threadPoolName
- The thread pool to usecommand
- The command to executedelay
- The delay before first runinterval
- The interval of repeated runsvoid remove(Runnable command)
Runnable
from the execution stack
command
- The command to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |