public interface IPoolStrategy
Modifier and Type | Method and Description |
---|---|
int |
getCapacity()
Get the number of free workers.
|
int |
getWorkerCount()
Get the worker cnt.
|
long |
getWorkerTimeout()
Get the component timeout.
|
boolean |
taskAdded()
Called when a new task was added to the pool.
|
boolean |
taskFinished()
Called when a task is finished.
|
void |
taskServed(long waitdur)
Called when a new task was served from the pool.
|
void |
workersAdded(int cnt)
Called when a new worker was added proactively to the pool.
|
boolean |
workerTimeoutOccurred()
Notify the strategy that a timeout for a component has occurred,
i.e. it was not needed for serving some worker.
|
boolean taskAdded()
void workersAdded(int cnt)
cnt
- The number of new workers.void taskServed(long waitdur)
waitdur
- The waiting time of the task.boolean taskFinished()
long getWorkerTimeout()
boolean workerTimeoutOccurred()
int getWorkerCount()
int getCapacity()
Copyright © 2013. All Rights Reserved.