public class ThreadPoolMetrics
extends java.lang.Object
ThreadPoolExecutor
.Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ThreadPoolMetrics(java.util.concurrent.ThreadPoolExecutor executor,
java.lang.String path,
java.lang.String poolName)
Create metrics for given ThreadPoolExecutor.
|
Modifier and Type | Method and Description |
---|---|
void |
release() |
public final com.yammer.metrics.core.Gauge<java.lang.Integer> activeTasks
public final com.yammer.metrics.core.Counter totalBlocked
public final com.yammer.metrics.core.Counter currentBlocked
public final com.yammer.metrics.core.Gauge<java.lang.Long> completedTasks
public final com.yammer.metrics.core.Gauge<java.lang.Long> pendingTasks
public ThreadPoolMetrics(java.util.concurrent.ThreadPoolExecutor executor, java.lang.String path, java.lang.String poolName)
executor
- Thread poolpath
- Type of thread poolpoolName
- Name of thread pool to identify metricsCopyright © 2013 The Apache Software Foundation