public class InstrumentedThreadFactory
extends java.lang.Object
implements java.util.concurrent.ThreadFactory
ThreadFactory that monitors the number of threads created, running and terminated.
It will register the metrics using the given (or auto-generated) name as classifier, e.g:
"your-thread-delegate.created", "your-thread-delegate.running", etc.| Constructor and Description |
|---|
InstrumentedThreadFactory(java.util.concurrent.ThreadFactory delegate,
MetricRegistry registry)
Wraps a
ThreadFactory, uses a default auto-generated name. |
InstrumentedThreadFactory(java.util.concurrent.ThreadFactory delegate,
MetricRegistry registry,
java.lang.String name)
Wraps a
ThreadFactory with an explicit name. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Thread |
newThread(java.lang.Runnable runnable) |
public InstrumentedThreadFactory(java.util.concurrent.ThreadFactory delegate,
MetricRegistry registry)
ThreadFactory, uses a default auto-generated name.delegate - ThreadFactory to wrap.registry - MetricRegistry that will contain the metrics.public InstrumentedThreadFactory(java.util.concurrent.ThreadFactory delegate,
MetricRegistry registry,
java.lang.String name)
ThreadFactory with an explicit name.delegate - ThreadFactory to wrap.registry - MetricRegistry that will contain the metrics.name - name for this delegate."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"