public class DefaultThreadPoolStrategy extends Object implements IThreadPoolStrategy
| Constructor and Description |
|---|
DefaultThreadPoolStrategy(int threadcnt,
int desfree,
long maxwait,
int maxthreadcnt)
Create a new default threadpool strategy.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getThreadCount()
Get the threadcnt.
|
long |
getThreadTimeout()
Get the thread timeout.
|
boolean |
taskAdded()
Called when a new task was added to the pool.
|
boolean |
taskFinished()
Called when a task is finished.
|
boolean |
threadTimeoutOccurred()
Notify the strategy that a timeout for a thread has occurred,
i.e. it was not needed for serving some task.
|
public DefaultThreadPoolStrategy(int threadcnt,
int desfree,
long maxwait,
int maxthreadcnt)
public boolean taskAdded()
taskAdded in interface IThreadPoolStrategypublic boolean taskFinished()
taskFinished in interface IThreadPoolStrategypublic long getThreadTimeout()
getThreadTimeout in interface IThreadPoolStrategypublic boolean threadTimeoutOccurred()
threadTimeoutOccurred in interface IThreadPoolStrategypublic int getThreadCount()
getThreadCount in interface IThreadPoolStrategyCopyright © 2012. All Rights Reserved.