|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Pipeline<E>
An interface used as a wrapper around any kind of thread pool.
| Method Summary | |
|---|---|
void |
execute(E task)
Add an E to be processed by this Pipeline |
boolean |
expireKey(SelectionKey key)
Invoked when the SelectorThread is about to expire a SelectionKey. |
int |
getCurrentThreadCount()
Return the number of active threads. |
int |
getCurrentThreadsBusy()
Return the curent number of threads that are currently processing a task. |
int |
getMaxThreads()
Return the number of threads used by this pipeline. |
String |
getName()
Return the name of this Pipeline |
int |
getWaitingThread()
Return the number of waiting threads. |
void |
initPipeline()
Init the Pipeline by initializing the required
WorkerThread. |
void |
setMaxThreads(int maxThread)
Set the maximum thread this pipeline can handle. |
void |
setMinThreads(int minThread)
Set the minimum thread this pipeline can handle. |
void |
setName(String name)
Set the name of this Pipeline |
void |
setPort(int port)
Set the port this Pipeline is associated with. |
void |
setPriority(int priority)
Set the Thread priority used when creating new threads. |
void |
setQueueSizeInBytes(int maxQueueSizeInBytesCount)
Set the maximum pending connection this Pipeline
can handle. |
void |
setThreadsIncrement(int processorThreadsIncrement)
Set the number the Pipeline will use when increasing the
thread pool |
int |
size()
Returns the number of tasks in this Pipeline. |
void |
startPipeline()
Start the Pipeline |
void |
stopPipeline()
Stop the Pipeline |
E |
waitForIoTask()
Return a E object available in the pipeline. |
| Method Detail |
|---|
boolean expireKey(SelectionKey key)
key - SelectionKey
void execute(E task)
throws PipelineFullException
E to be processed by this Pipeline
task -
PipelineFullExceptionE waitForIoTask()
E object available in the pipeline.
int getWaitingThread()
int getMaxThreads()
int getCurrentThreadCount()
int getCurrentThreadsBusy()
void initPipeline()
Pipeline by initializing the required
WorkerThread. Default value is 10
String getName()
Pipeline
Pipelinevoid startPipeline()
Pipeline
void stopPipeline()
Pipeline
void setPriority(int priority)
Thread priority used when creating new threads.
priority - void setMaxThreads(int maxThread)
maxThread - void setMinThreads(int minThread)
minThread - void setPort(int port)
Pipeline is associated with.
port - void setName(String name)
Pipeline
name - void setQueueSizeInBytes(int maxQueueSizeInBytesCount)
Pipeline
can handle.
maxQueueSizeInBytesCount - void setThreadsIncrement(int processorThreadsIncrement)
Pipeline will use when increasing the
thread pool
processorThreadsIncrement - int size()
Pipeline.
Pipeline.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||