public class SimpleMapCounter extends SimpleLongCounter implements SimpleMapCounterMBean, MapCounter
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> |
values
Accumulated values
|
Constructor and Description |
---|
SimpleMapCounter() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Long> |
getValues()
Returns accumulated values.
|
void |
reset()
Reset counters
|
void |
update(java.lang.String valueName,
long value)
Update counter
|
getCount, getTotal, print, print, toString, update
enable, getAnnotation, isEnabled, register, setAnnotation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCount, getTotal, print
enable, getAnnotation, isEnabled, setAnnotation
toString
dump
private java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> values
public void update(java.lang.String valueName, long value)
update
in interface MapCounter
valueName
- value name to updatevalue
- new valuepublic java.util.Map<java.lang.String,java.lang.Long> getValues()
getValues
in interface SimpleMapCounterMBean
public void reset()
reset
in interface SimpleLongCounterMBean
reset
in class SimpleLongCounter