|
||||||||||
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()
Returns the approximate number of threads that are actively executing tasks. |
long |
getCompletedTaskCount()
Returns the approximate total number of tasks that have completed execution. |
int |
getLargestPoolSize()
Returns the largest number of threads that have ever simultaneously been in the pool. |
int |
getPoolSize()
Returns the current number of threads in the pool. |
int |
getPort()
Get the port number, which is served by the thread pool |
int |
getQueueSize()
Returns the number of tasks, which are currently waiting in the queue. |
ThreadPoolStatistic |
getStatistic()
Return the ThreadPoolStatistic object used
to gather statistic; |
int |
getTaskCount()
Returns the approximate total number of tasks that have been scheduled for execution. |
protected void |
injectToStringAttributes(StringBuilder sb)
Deprecated. |
boolean |
isShutdown()
|
boolean |
isTerminated()
|
GrizzlyExecutorService |
reconfigure(ThreadPoolConfig config)
Sets the ThreadPoolConfig |
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, newTaskFor, newTaskFor, 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 Executor
execute
in class GrizzlyExecutorService
public void shutdown()
shutdown
in interface ExecutorService
shutdown
in class GrizzlyExecutorService
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
shutdownNow
in class GrizzlyExecutorService
public 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)
GrizzlyExecutorService
ThreadPoolConfig
reconfigure
in class GrizzlyExecutorService
GrizzlyExecutorService
public int getLargestPoolSize()
ExtendedThreadPool
getLargestPoolSize
in interface ExtendedThreadPool
getLargestPoolSize
in class GrizzlyExecutorService
public int getPoolSize()
ExtendedThreadPool
getPoolSize
in interface ExtendedThreadPool
getPoolSize
in class GrizzlyExecutorService
public int getQueueSize()
ExtendedThreadPool
getQueueSize
in interface ExtendedThreadPool
getQueueSize
in class GrizzlyExecutorService
public int getActiveCount()
ExtendedThreadPool
getActiveCount
in interface ExtendedThreadPool
getActiveCount
in class GrizzlyExecutorService
public int getTaskCount()
ExtendedThreadPool
getTaskCount
in interface ExtendedThreadPool
getTaskCount
in class GrizzlyExecutorService
public long getCompletedTaskCount()
ExtendedThreadPool
getCompletedTaskCount
in interface ExtendedThreadPool
getCompletedTaskCount
in class GrizzlyExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
isShutdown
in class GrizzlyExecutorService
public boolean isTerminated()
isTerminated
in interface ExecutorService
isTerminated
in class GrizzlyExecutorService
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
awaitTermination
in class GrizzlyExecutorService
InterruptedException
public String toString()
toString
in class Object
protected void injectToStringAttributes(StringBuilder sb)
StringBuilder
sb
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |