|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Pipeline
An interface used as a wrapper around any kind of thread pool
| Method Summary | |
|---|---|
void |
addTask(Task task)
Add an Task 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 |
getMaxSpareThreads()
Return the number of maximum spare thread. |
int |
getMaxThreads()
Return the number of threads used by this pipeline. |
int |
getMinSpareThreads()
Return the number of minimum spare thread. |
String |
getName()
Return the name of this Pipeline |
PipelineStatistic |
getPipelineStatistic()
Return the PipelineStatistic object used
to gather statistic; |
Task |
getTask()
Return a Task object available in the pipeline. |
int |
getWaitingThread()
Return the number of waiting threads. |
void |
initPipeline()
Init the Pipeline by initializing the required
WorkerThread. |
boolean |
interruptThread(long threadId)
Interrup the Thread using it thread id |
void |
setMaxThreads(int maxThread)
Set the maximum thread this pipeline can handle. |
void |
setMinSpareThreads(int minSpareThreads)
Set the number of minimum spare thread. |
void |
setMinThreads(int minThread)
Set the minimum thread this pipeline can handle. |
void |
setName(String name)
Set the name of this Pipeline |
void |
setPipelineStatistic(PipelineStatistic pipelineStatistic)
Set the PipelineStatistic object used
to gather statistic; |
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 |
void |
setThreadsTimeout(int processorThreadsTimeout)
Set the timeout value a thread will use to times out the request. |
int |
size()
Returns the number of tasks in this Pipeline. |
void |
startPipeline()
Start the Pipeline |
void |
stopPipeline()
Stop the Pipeline |
| Method Detail |
|---|
boolean expireKey(SelectionKey key)
void addTask(Task task)
Task to be processed by this Pipeline
Task getTask()
Task 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
void startPipeline()
Pipeline
void stopPipeline()
Pipeline
void setPriority(int priority)
Thread priority used when creating new threads.
void setMaxThreads(int maxThread)
void setMinThreads(int minThread)
void setPort(int port)
Pipeline is associated with.
void setName(String name)
Pipeline
void setQueueSizeInBytes(int maxQueueSizeInBytesCount)
Pipeline
can handle.
void setThreadsIncrement(int processorThreadsIncrement)
Pipeline will use when increasing the
thread pool
void setThreadsTimeout(int processorThreadsTimeout)
void setPipelineStatistic(PipelineStatistic pipelineStatistic)
PipelineStatistic object used
to gather statistic;
PipelineStatistic getPipelineStatistic()
PipelineStatistic object used
to gather statistic;
int size()
Pipeline.
Pipeline.int getMaxSpareThreads()
int getMinSpareThreads()
void setMinSpareThreads(int minSpareThreads)
boolean interruptThread(long threadId)
Thread using it thread id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||