public class WorkExecutorPoolImpl extends Object implements WorkExecutorPool
| Constructor and Description |
|---|
WorkExecutorPoolImpl(int maxSize)
Creates a pool with the specified minimum and maximum sizes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(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.
|
public WorkExecutorPoolImpl(int maxSize)
maxSize - Maximum size of the work executor pool.public void execute(Runnable work)
public int getPoolSize()
getPoolSize in interface WorkExecutorPoolpublic int getMaximumPoolSize()
getMaximumPoolSize in interface WorkExecutorPoolpublic void setMaximumPoolSize(int maxSize)
setMaximumPoolSize in interface WorkExecutorPoolmaxSize - New maximum size of this pool.public WorkExecutorPool start()
start in interface WorkExecutorPoolpublic WorkExecutorPool stop()
stop in interface WorkExecutorPoolCopyright © 2023. All rights reserved.