|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.impl.work.WorkExecutorPoolImpl
Based class for WorkExecutorPool. Sub-classes define the synchronization policy (should the call block until the end of the work; or when it starts et cetera).
Constructor Summary | |
WorkExecutorPoolImpl(Channel channel,
int maxSize)
Creates a pool with the specified minimum and maximum sizes and using the specified Channel to enqueue the submitted Work instances. |
|
WorkExecutorPoolImpl(ThreadingProfile profile,
java.lang.String name)
Creates a pool with the specified minimum and maximum sizes. |
Method Summary | |
void |
execute(java.lang.Runnable work)
Execute the specified Work. |
int |
getMaximumPoolSize()
Gets the maximum size of this pool. |
int |
getPoolSize()
Gets the size of this pool. |
void |
setMaximumPoolSize(int maxSize)
Sets the maximum size of this pool. |
WorkExecutorPool |
start()
|
WorkExecutorPool |
stop()
Stops this pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkExecutorPoolImpl(ThreadingProfile profile, java.lang.String name)
profile
- The threading profile to use when creating a pool for
this work managername
- The name to associate with the threads created in this poolpublic WorkExecutorPoolImpl(Channel channel, int maxSize)
channel
- Queue to be used as the queueing facility of this pool.maxSize
- Maximum size of the work executor pool.Method Detail |
public void execute(java.lang.Runnable work) throws java.lang.InterruptedException
work
- Work to be executed.
java.lang.InterruptedException
- Indicates that the Work execution has been
unsuccessful.public int getPoolSize()
getPoolSize
in interface WorkExecutorPool
public int getMaximumPoolSize()
getMaximumPoolSize
in interface WorkExecutorPool
public void setMaximumPoolSize(int maxSize)
setMaximumPoolSize
in interface WorkExecutorPool
maxSize
- New maximum size of this pool.public WorkExecutorPool start()
start
in interface WorkExecutorPool
public WorkExecutorPool stop()
stop
in interface WorkExecutorPool
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |