com.sun.grizzly.http
Class StatsThreadPool
java.lang.Object
java.util.concurrent.AbstractExecutorService
com.sun.grizzly.util.AbstractThreadPool
com.sun.grizzly.util.SyncThreadPool
com.sun.grizzly.http.StatsThreadPool
- All Implemented Interfaces:
- ExtendedThreadPool, Thread.UncaughtExceptionHandler, Executor, ExecutorService
public class StatsThreadPool
- extends SyncThreadPool
Internal FIFO used by the Worker Threads to pass information
between Task objects.
- Author:
- Jean-Francois Arcand
| Fields inherited from class com.sun.grizzly.util.AbstractThreadPool |
byteBufferType, corePoolSize, DEFAULT_IDLE_THREAD_KEEPALIVE_TIMEOUT, DEFAULT_MAX_TASKS_QUEUED, DEFAULT_MAX_THREAD_COUNT, DEFAULT_MIN_THREAD_COUNT, initialByteBufferSize, keepAliveTime, maxPoolSize, name, poison, priority, threadFactory |
| Methods inherited from class com.sun.grizzly.util.SyncThreadPool |
afterExecute, awaitTermination, beforeExecute, execute, getActiveCount, getCompletedTaskCount, getLargestPoolSize, getMaxQueuedTasksCount, getPoolSize, getQueue, getQueueSize, getTaskCount, isShutdown, isTerminated, nextThreadId, onWorkerExit, setMaxQueuedTasksCount, setPoolSizes, shutdown, shutdownNow, start, startWorker, stop |
| Methods inherited from class com.sun.grizzly.util.AbstractThreadPool |
getByteBufferType, getCorePoolSize, getInitialByteBufferSize, getKeepAliveTime, getMaximumPoolSize, getName, getPriority, getThreadFactory, onMaxNumberOfThreadsReached, onTaskDequeued, onTaskQueued, onTaskQueueOverflow, onWorkerStarted, setByteBufferType, setCorePoolSize, setInitialByteBufferSize, setKeepAliveTime, setMaximumPoolSize, setName, setPriority, setThreadFactory, uncaughtException, validateNewPoolSize |
port
protected int port
- Port, which is served by this thread pool
threadPoolStat
protected transient ThreadPoolStatistic threadPoolStat
- The
ThreadPoolStatistic objects used when gathering statistics.
StatsThreadPool
public StatsThreadPool()
StatsThreadPool
public StatsThreadPool(int maxTasksCount)
StatsThreadPool
public StatsThreadPool(int corePoolSize,
int maximumPoolSize,
int maxTasksCount,
long keepAliveTime,
TimeUnit unit)
StatsThreadPool
public StatsThreadPool(String name,
int corePoolSize,
int maximumPoolSize,
int maxTasksCount,
long keepAliveTime,
TimeUnit unit)
getPort
public int getPort()
- Get the port number, which is served by the thread pool
- Returns:
- the port number, which is served by the thread pool
setPort
public void setPort(int port)
- Set the port number, which is served by the thread pool
- Parameters:
port - the port number, which is served by the thread pool
setStatistic
public void setStatistic(ThreadPoolStatistic threadPoolStatistic)
- Set the
ThreadPoolStatistic object used
to gather statistic;
getStatistic
public ThreadPoolStatistic getStatistic()
- Return the
ThreadPoolStatistic object used
to gather statistic;
toString
public String toString()
- Overrides:
toString in class SyncThreadPool
injectToStringAttributes
protected void injectToStringAttributes(StringBuilder sb)
- Overrides:
injectToStringAttributes in class SyncThreadPool
Copyright © 2009 SUN Microsystems. All Rights Reserved.