org.elasticsearch.threadpool
Class ThreadPoolStats

java.lang.Object
  extended by org.elasticsearch.threadpool.ThreadPoolStats
All Implemented Interfaces:
java.io.Serializable, Streamable, ToXContent

public class ThreadPoolStats
extends java.lang.Object
implements Streamable, java.io.Serializable, ToXContent

Thread Pool level stats.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
ThreadPoolStats(int poolSize, int activeCount, int schedulerPoolSize, int schedulerActiveCount)
           
 
Method Summary
 int activeCount()
          Returns the approximate number of threads that are actively executing tasks.
 int getActiveCount()
          Returns the approximate number of threads that are actively executing tasks.
 int getPoolSize()
          Returns the current number of threads in the pool.
 int getSchedulerActiveCount()
          The approximate number of threads that are actively executing scheduled tasks.
 int getSchedulerPoolSize()
          The size of the scheduler thread pool.
 int poolSize()
          Returns the current number of threads in the pool.
 void readFrom(StreamInput in)
           
static ThreadPoolStats readThreadPoolStats(StreamInput in)
           
 int schedulerActiveCount()
          The approximate number of threads that are actively executing scheduled tasks.
 int schedulerPoolSize()
          The size of the scheduler thread pool.
 void toXContent(XContentBuilder builder, ToXContent.Params params)
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolStats

public ThreadPoolStats(int poolSize,
                       int activeCount,
                       int schedulerPoolSize,
                       int schedulerActiveCount)
Method Detail

readThreadPoolStats

public static ThreadPoolStats readThreadPoolStats(StreamInput in)
                                           throws java.io.IOException
Throws:
java.io.IOException

readFrom

public void readFrom(StreamInput in)
              throws java.io.IOException
Specified by:
readFrom in interface Streamable
Throws:
java.io.IOException

writeTo

public void writeTo(StreamOutput out)
             throws java.io.IOException
Specified by:
writeTo in interface Streamable
Throws:
java.io.IOException

toXContent

public void toXContent(XContentBuilder builder,
                       ToXContent.Params params)
                throws java.io.IOException
Specified by:
toXContent in interface ToXContent
Throws:
java.io.IOException

poolSize

public int poolSize()
Returns the current number of threads in the pool.

Returns:
the number of threads

getPoolSize

public int getPoolSize()
Returns the current number of threads in the pool.

Returns:
the number of threads

activeCount

public int activeCount()
Returns the approximate number of threads that are actively executing tasks.

Returns:
the number of threads

getActiveCount

public int getActiveCount()
Returns the approximate number of threads that are actively executing tasks.

Returns:
the number of threads

schedulerPoolSize

public int schedulerPoolSize()
The size of the scheduler thread pool.


getSchedulerPoolSize

public int getSchedulerPoolSize()
The size of the scheduler thread pool.


schedulerActiveCount

public int schedulerActiveCount()
The approximate number of threads that are actively executing scheduled tasks.


getSchedulerActiveCount

public int getSchedulerActiveCount()
The approximate number of threads that are actively executing scheduled tasks.