|
||||||||||
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.exolab.jms.common.threads.ThreadPool
public class ThreadPool
Thread pool.
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 | |
---|---|
ThreadPool(java.lang.String name,
EDU.oswego.cs.dl.util.concurrent.Channel channel,
int maxPoolSize)
Construct a new ThreadPool . |
|
ThreadPool(java.lang.String name,
EDU.oswego.cs.dl.util.concurrent.Channel channel,
int maxPoolSize,
boolean daemon)
Construct a new ThreadPool . |
|
ThreadPool(java.lang.String name,
int maxPoolSize)
Construct a new ThreadPool . |
|
ThreadPool(java.lang.String name,
int maxPoolSize,
boolean daemon)
Construct a new ThreadPool . |
|
ThreadPool(java.lang.ThreadGroup group,
java.lang.String name,
EDU.oswego.cs.dl.util.concurrent.Channel channel,
int maxPoolSize,
boolean daemon)
Construct a new ThreadPool . |
|
ThreadPool(java.lang.ThreadGroup group,
java.lang.String name,
int maxPoolSize)
Construct a new ThreadPool . |
Method Summary | |
---|---|
void |
execute(java.lang.Runnable command)
Arrange for the given command to be executed by a thread in this pool. |
void |
setThreadListener(ThreadListener listener)
Sets a listener to be notified when a thread processes a command. |
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
abortWhenBlocked, addThread, awaitTerminationAfterShutdown, awaitTerminationAfterShutdown, createThreads, discardOldestWhenBlocked, discardWhenBlocked, drain, 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 ThreadPool(java.lang.String name, int maxPoolSize)
ThreadPool
.
name
- the name to assign the thread group and worker
threadsmaxPoolSize
- the maximum no. of threads to usepublic ThreadPool(java.lang.String name, EDU.oswego.cs.dl.util.concurrent.Channel channel, int maxPoolSize)
ThreadPool
.
name
- the name to assign the thread group and worker
threadschannel
- the channel for queueingmaxPoolSize
- the maximum no. of threads to usepublic ThreadPool(java.lang.String name, int maxPoolSize, boolean daemon)
ThreadPool
.
name
- the name of the poolmaxPoolSize
- the maximum no. of threads to usedaemon
- if true
all threads will be daemon
threadspublic ThreadPool(java.lang.String name, EDU.oswego.cs.dl.util.concurrent.Channel channel, int maxPoolSize, boolean daemon)
ThreadPool
.
name
- the name of the poolchannel
- the channel for queueingmaxPoolSize
- the maximum no. of threads to usedaemon
- if true
all threads will be daemon
threadspublic ThreadPool(java.lang.ThreadGroup group, java.lang.String name, int maxPoolSize)
ThreadPool
.
group
- the thread group. May be null
name
- the name to assign worker threadsmaxPoolSize
- the maximum no. of threads to usepublic ThreadPool(java.lang.ThreadGroup group, java.lang.String name, EDU.oswego.cs.dl.util.concurrent.Channel channel, int maxPoolSize, boolean daemon)
ThreadPool
.
group
- the thread group. May be null
name
- the name to assign worker threadschannel
- the channel for queueingmaxPoolSize
- the maximum no. of threads to usedaemon
- if true
all threads will be daemon
threadsMethod Detail |
---|
public void setThreadListener(ThreadListener listener)
listener
- the listenerpublic void execute(java.lang.Runnable command) throws java.lang.InterruptedException
execute
in interface EDU.oswego.cs.dl.util.concurrent.Executor
execute
in class EDU.oswego.cs.dl.util.concurrent.PooledExecutor
java.lang.InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |