public final class DynamicCounter extends AbstractMonitor<java.lang.Long> implements CompositeMonitor<java.lang.Long>
MonitorConfig
. Counters are automatically expired after 15 minutes of inactivity.config
Modifier and Type | Method and Description |
---|---|
java.util.List<Monitor<?>> |
getMonitors()
Returns a list of sub-monitors for this composite.
|
java.lang.Long |
getValue(int pollerIndex)
Returns the current value for the monitor for the nth poller.
|
static void |
increment(MonitorConfig config)
Increment a counter based on a given
MonitorConfig . |
static void |
increment(MonitorConfig config,
long delta)
Increment a counter based on a given
MonitorConfig by a given delta. |
static void |
increment(java.lang.String name,
java.lang.String... tags)
Increment a counter specified by a name, and a sequence of (key, value) pairs.
|
static void |
increment(java.lang.String name,
TagList list)
Increment the counter for a given name, tagList.
|
static void |
increment(java.lang.String name,
TagList list,
long delta)
Increment the counter for a given name, tagList by a given delta.
|
java.lang.String |
toString() |
getConfig, getValue
public static void increment(MonitorConfig config)
MonitorConfig
.public static void increment(java.lang.String name, java.lang.String... tags)
public static void increment(MonitorConfig config, long delta)
MonitorConfig
by a given delta.config
- The monitoring configdelta
- The amount added to the current valuepublic static void increment(java.lang.String name, TagList list)
public static void increment(java.lang.String name, TagList list, long delta)
public java.util.List<Monitor<?>> getMonitors()
getMonitors
in interface CompositeMonitor<java.lang.Long>
public java.lang.Long getValue(int pollerIndex)
public java.lang.String toString()
toString
in class java.lang.Object