|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser
EDU.oswego.cs.dl.util.concurrent.PooledExecutor
org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool
public class DefaultThreadPool
A thread pool that allows to execute tasks using pooled threads in order to ease the thread creation overhead.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
EDU.oswego.cs.dl.util.concurrent.PooledExecutor.AbortWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.BlockedExecutionHandler, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.DiscardOldestWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.DiscardWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.RunWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.WaitWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.Worker |
Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
---|
EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser.DefaultThreadFactory |
Field Summary |
---|
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
blockedExecutionHandler_, DEFAULT_KEEPALIVETIME, DEFAULT_MAXIMUMPOOLSIZE, DEFAULT_MINIMUMPOOLSIZE, handOff_, keepAliveTime_, maximumPoolSize_, minimumPoolSize_, poolSize_, shutdown_, threads_ |
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
---|
threadFactory_ |
Constructor Summary | |
---|---|
DefaultThreadPool(int poolSize,
boolean syncThreads)
Create a new pool. |
Method Summary | |
---|---|
void |
close()
Close the pool i.e, stop pooling threads. |
void |
configure(int poolSize)
Configure a new pool size. |
void |
executeTask(Runnable task)
Execute the task in a free thread or create a new one. |
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
abortWhenBlocked, addThread, awaitTerminationAfterShutdown, awaitTerminationAfterShutdown, createThreads, discardOldestWhenBlocked, discardWhenBlocked, drain, execute, getBlockedExecutionHandler, getKeepAliveTime, getMaximumPoolSize, getMinimumPoolSize, getPoolSize, getTask, interruptAll, isTerminatedAfterShutdown, runWhenBlocked, setBlockedExecutionHandler, setKeepAliveTime, setMaximumPoolSize, setMinimumPoolSize, shutdownAfterProcessingCurrentlyQueuedTasks, shutdownAfterProcessingCurrentlyQueuedTasks, shutdownNow, shutdownNow, waitWhenBlocked, workerDone |
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
---|
getThreadFactory, setThreadFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultThreadPool(int poolSize, boolean syncThreads)
Method Detail |
---|
public void configure(int poolSize)
public void close()
public void executeTask(Runnable task)
task
- The task to execute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |