FileDocCategorySizeDatePackage
Pipeline.javaAPI DocGlassfish v2 API5872Fri May 04 22:37:04 BST 2007com.sun.enterprise.web.connector.grizzly

Pipeline

public interface Pipeline
An interface used as a wrapper around any kind of thread pool
author
Jean-Francois Arcand

Fields Summary
Constructors Summary
Methods Summary
public voidaddTask(Task task)
Add an Task to be processed by this Pipeline

public booleanexpireKey(java.nio.channels.SelectionKey key)
Invoked when the SelectorThread is about to expire a SelectionKey.

return
true if the SelectorThread should expire the SelectionKey, false if not.

public intgetCurrentThreadCount()
Return the number of active threads.

public intgetCurrentThreadsBusy()
Return the curent number of threads that are currently processing a task.

public intgetMaxSpareThreads()
Return the number of maximum spare thread.

public intgetMaxThreads()
Return the number of threads used by this pipeline.

public intgetMinSpareThreads()
Return the number of minimum spare thread.

public java.lang.StringgetName()
Return the name of this Pipeline

public PipelineStatisticgetPipelineStatistic()
Return the PipelineStatistic object used to gather statistic;

public TaskgetTask()
Return a Task object available in the pipeline.

public intgetWaitingThread()
Return the number of waiting threads.

public voidinitPipeline()
Init the Pipeline by initializing the required WorkerThread. Default value is 10

public booleaninterruptThread(long threadId)
Interrup the Thread using it thread id

public voidsetMaxThreads(int maxThread)
Set the maximum thread this pipeline can handle.

public voidsetMinSpareThreads(int minSpareThreads)
Set the number of minimum spare thread.

public voidsetMinThreads(int minThread)
Set the minimum thread this pipeline can handle.

public voidsetName(java.lang.String name)
Set the name of this Pipeline

public voidsetPipelineStatistic(PipelineStatistic pipelineStatistic)
Set the PipelineStatistic object used to gather statistic;

public voidsetPort(int port)
Set the port this Pipeline is associated with.

public voidsetPriority(int priority)
Set the Thread priority used when creating new threads.

public voidsetQueueSizeInBytes(int maxQueueSizeInBytesCount)
Set the maximum pending connection this Pipeline can handle.

public voidsetThreadsIncrement(int processorThreadsIncrement)
Set the number the Pipeline will use when increasing the thread pool

public voidsetThreadsTimeout(int processorThreadsTimeout)
Set the timeout value a thread will use to times out the request.

public intsize()
Returns the number of tasks in this Pipeline.

return
Number of tasks in this Pipeline.

public voidstartPipeline()
Start the Pipeline

public voidstopPipeline()
Stop the Pipeline