|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PooledExecutor
An interface to executors that queue executables and run them when a pooled thread is available.
| Method Summary | |
|---|---|
int |
getCorePoolSize()
Gets the number of threads to cache (default = 0). |
long |
getKeepAliveTime()
Gets the number of milliseconds to keep alive threads exceeding the number of core threads waiting for new commands. |
int |
getLargestPoolSize()
Gets the largest number of active threads in the pool ever. |
int |
getMaxPoolSize()
Gets the maximum number of threads to simultaneously execute. |
int |
getPoolSize()
Gets the current number of active threads in the pool. |
int |
getQueueCapacity()
Gets the queue capacity of the executor. |
RejectedExecutionHandler |
getRejectedExecutionHandler()
Gets the rejected execution handler. |
int |
prestartAllCoreThreads()
Creates and starts the core threads in the pool. |
boolean |
prestartCoreThread()
Creates and starts a new core thread in the pool. |
void |
purge()
Purges cancelled tasks from the queue. |
boolean |
remove(Runnable task)
Removes the specified task. |
void |
setCorePoolSize(int size)
Set the number of threads to cache. |
void |
setKeepAliveTime(long msecs)
Sets the number of milliseconds to keep alive threads exceeding the number of core threads waiting for new commands. |
void |
setMaxPoolSize(int size)
Sets the maximum number of threads to use. |
void |
setRejectedExecutionHandler(RejectedExecutionHandler handler)
Sets the rejected execution handler. |
| Methods inherited from interface org.norther.tammi.core.thread.ThreadedExecutor |
|---|
getThreadFactoryName, setThreadFactoryName |
| Methods inherited from interface org.norther.tammi.core.thread.Executor |
|---|
getActiveCount, getCompletedTaskCount, getTaskCount |
| Methods inherited from interface java.util.concurrent.ExecutorService |
|---|
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit |
| Methods inherited from interface java.util.concurrent.Executor |
|---|
execute |
| Methods inherited from interface org.norther.tammi.core.base.Startable |
|---|
isStarted, start, stop |
| Method Detail |
|---|
int getQueueCapacity()
long getKeepAliveTime()
void setKeepAliveTime(long msecs)
msecs - the keep alive time in msecs.int getMaxPoolSize()
void setMaxPoolSize(int size)
size - the max pool size or -1 for unlimited.
IllegalArgumentException - if less or equal to zero.int getCorePoolSize()
void setCorePoolSize(int size)
size - the core pool size.
IllegalArgumentException - if less than zero.int getPoolSize()
int getLargestPoolSize()
RejectedExecutionHandler getRejectedExecutionHandler()
void setRejectedExecutionHandler(RejectedExecutionHandler handler)
handler - the handler to apply.boolean prestartCoreThread()
int prestartAllCoreThreads()
void purge()
boolean remove(Runnable task)
task - the task.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||