|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.concurrent.AbstractExecutorService
com.sun.grizzly.util.GrizzlyExecutorService
com.sun.grizzly.http.StatsThreadPool
public class StatsThreadPool
Internal FIFO used by the Worker Threads to pass information
between Task objects.
| Nested Class Summary | |
|---|---|
protected static class |
StatsThreadPool.HttpWorkerThreadFactory
Create new HttpWorkerThread. |
| Field Summary | |
|---|---|
static int |
DEFAULT_IDLE_THREAD_KEEPALIVE_TIMEOUT
|
static int |
DEFAULT_MAX_TASKS_QUEUED
|
static int |
DEFAULT_MAX_THREAD_COUNT
|
static int |
DEFAULT_MIN_THREAD_COUNT
|
protected int |
port
Port, which is served by this thread pool |
protected ThreadPoolStatistic |
threadPoolStat
|
| Fields inherited from class com.sun.grizzly.util.GrizzlyExecutorService |
|---|
config |
| Constructor Summary | |
|---|---|
StatsThreadPool()
|
|
StatsThreadPool(int maxTasksCount)
|
|
StatsThreadPool(int corePoolSize,
int maximumPoolSize,
int maxTasksCount,
long keepAliveTime,
TimeUnit unit)
|
|
StatsThreadPool(String name,
int corePoolSize,
int maximumPoolSize,
int maxTasksCount,
long keepAliveTime,
TimeUnit unit)
|
|
StatsThreadPool(ThreadPoolConfig config)
|
|
| Method Summary | |
|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
|
void |
execute(Runnable r)
|
int |
getActiveCount()
|
long |
getCompletedTaskCount()
|
int |
getLargestPoolSize()
|
int |
getPoolSize()
|
int |
getPort()
Get the port number, which is served by the thread pool |
int |
getQueueSize()
|
ThreadPoolStatistic |
getStatistic()
Return the ThreadPoolStatistic object used
to gather statistic; |
int |
getTaskCount()
|
protected void |
injectToStringAttributes(StringBuilder sb)
Deprecated. |
boolean |
isShutdown()
|
boolean |
isTerminated()
|
GrizzlyExecutorService |
reconfigure(ThreadPoolConfig config)
|
void |
setPort(int port)
Set the port number, which is served by the thread pool |
void |
setStatistic(ThreadPoolStatistic threadPoolStatistic)
Set the ThreadPoolStatistic object used
to gather statistic; |
void |
shutdown()
|
List<Runnable> |
shutdownNow()
|
void |
start()
|
void |
stop()
|
String |
toString()
|
| Methods inherited from class com.sun.grizzly.util.GrizzlyExecutorService |
|---|
createInstance, createInstance, getConfiguration, getCorePoolSize, getKeepAliveTime, getMaximumPoolSize, getMaxQueuedTasksCount, getName, getPriority, getQueue, getThreadFactory, setCorePoolSize, setImpl, setKeepAliveTime, setMaximumPoolSize, setMaxQueuedTasksCount, setName, setPriority, setThreadFactory |
| Methods inherited from class java.util.concurrent.AbstractExecutorService |
|---|
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.concurrent.ExecutorService |
|---|
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit |
| Field Detail |
|---|
public static int DEFAULT_MIN_THREAD_COUNT
public static int DEFAULT_MAX_THREAD_COUNT
public static int DEFAULT_MAX_TASKS_QUEUED
public static int DEFAULT_IDLE_THREAD_KEEPALIVE_TIMEOUT
protected int port
protected transient ThreadPoolStatistic threadPoolStat
| Constructor Detail |
|---|
public StatsThreadPool()
public StatsThreadPool(int maxTasksCount)
public StatsThreadPool(int corePoolSize,
int maximumPoolSize,
int maxTasksCount,
long keepAliveTime,
TimeUnit unit)
public StatsThreadPool(String name,
int corePoolSize,
int maximumPoolSize,
int maxTasksCount,
long keepAliveTime,
TimeUnit unit)
public StatsThreadPool(ThreadPoolConfig config)
| Method Detail |
|---|
public void start()
public void stop()
public final void execute(Runnable r)
execute in interface Executorexecute in class GrizzlyExecutorServicepublic void shutdown()
shutdown in interface ExecutorServiceshutdown in class GrizzlyExecutorServicepublic List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServiceshutdownNow in class GrizzlyExecutorServicepublic int getPort()
public void setPort(int port)
port - the port number, which is served by the thread poolpublic void setStatistic(ThreadPoolStatistic threadPoolStatistic)
ThreadPoolStatistic object used
to gather statistic;
public ThreadPoolStatistic getStatistic()
ThreadPoolStatistic object used
to gather statistic;
public GrizzlyExecutorService reconfigure(ThreadPoolConfig config)
reconfigure in class GrizzlyExecutorServicepublic int getLargestPoolSize()
getLargestPoolSize in interface ExtendedThreadPoolgetLargestPoolSize in class GrizzlyExecutorServicepublic int getPoolSize()
getPoolSize in interface ExtendedThreadPoolgetPoolSize in class GrizzlyExecutorServicepublic int getQueueSize()
getQueueSize in interface ExtendedThreadPoolgetQueueSize in class GrizzlyExecutorServicepublic int getActiveCount()
getActiveCount in interface ExtendedThreadPoolgetActiveCount in class GrizzlyExecutorServicepublic int getTaskCount()
getTaskCount in interface ExtendedThreadPoolgetTaskCount in class GrizzlyExecutorServicepublic long getCompletedTaskCount()
getCompletedTaskCount in interface ExtendedThreadPoolgetCompletedTaskCount in class GrizzlyExecutorServicepublic boolean isShutdown()
isShutdown in interface ExecutorServiceisShutdown in class GrizzlyExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServiceisTerminated in class GrizzlyExecutorService
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface ExecutorServiceawaitTermination in class GrizzlyExecutorServiceInterruptedExceptionpublic String toString()
toString in class Objectprotected void injectToStringAttributes(StringBuilder sb)
StringBuilder
sb -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||