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 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
Copyright © 2017. All rights reserved.