org.apache.cassandra.metrics
Class ThreadPoolMetrics

java.lang.Object
  extended by org.apache.cassandra.metrics.ThreadPoolMetrics

public class ThreadPoolMetrics
extends java.lang.Object

Metrics for ThreadPoolExecutor.


Field Summary
 com.yammer.metrics.core.Gauge<java.lang.Integer> activeTasks
          Number of active tasks.
 com.yammer.metrics.core.Gauge<java.lang.Long> completedTasks
          Number of completed tasks.
 com.yammer.metrics.core.Counter currentBlocked
          Number of tasks currently blocked, waiting to be accepted by the executor (because all threads are busy and the backing queue is full).
 com.yammer.metrics.core.Gauge<java.lang.Long> pendingTasks
          Number of tasks waiting to be executed.
 com.yammer.metrics.core.Counter totalBlocked
          Number of tasks that had blocked before being accepted (or rejected).
 
Constructor Summary
ThreadPoolMetrics(java.util.concurrent.ThreadPoolExecutor executor, java.lang.String path, java.lang.String poolName)
          Create metrics for given ThreadPoolExecutor.
 
Method Summary
 void release()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeTasks

public final com.yammer.metrics.core.Gauge<java.lang.Integer> activeTasks
Number of active tasks.


totalBlocked

public final com.yammer.metrics.core.Counter totalBlocked
Number of tasks that had blocked before being accepted (or rejected).


currentBlocked

public final com.yammer.metrics.core.Counter currentBlocked
Number of tasks currently blocked, waiting to be accepted by the executor (because all threads are busy and the backing queue is full).


completedTasks

public final com.yammer.metrics.core.Gauge<java.lang.Long> completedTasks
Number of completed tasks.


pendingTasks

public final com.yammer.metrics.core.Gauge<java.lang.Long> pendingTasks
Number of tasks waiting to be executed.

Constructor Detail

ThreadPoolMetrics

public ThreadPoolMetrics(java.util.concurrent.ThreadPoolExecutor executor,
                         java.lang.String path,
                         java.lang.String poolName)
Create metrics for given ThreadPoolExecutor.

Parameters:
executor - Thread pool
path - Type of thread pool
poolName - Name of thread pool to identify metrics
Method Detail

release

public void release()


Copyright © 2012 The Apache Software Foundation