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 IThreadPoolStrategy
public boolean taskFinished()
taskFinished
in interface IThreadPoolStrategy
public long getThreadTimeout()
getThreadTimeout
in interface IThreadPoolStrategy
public boolean threadTimeoutOccurred()
threadTimeoutOccurred
in interface IThreadPoolStrategy
public int getThreadCount()
getThreadCount
in interface IThreadPoolStrategy
Copyright © 2012. All Rights Reserved.