public class StatisticSimpleWeakrefCounter extends Statistics<StatisticSimpleWeakrefCounter>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Object,java.lang.Long> |
values
Reference counter data
|
replaceWith
Modifier | Constructor and Description |
---|---|
protected |
StatisticSimpleWeakrefCounter(java.lang.String name)
Creates a new instance of StatisticRefCounter
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object key) |
void |
add(java.lang.Object key,
long value)
Adds the passed value to the current value associated with the passed key.
|
protected StatisticSimpleWeakrefCounter |
cast()
Returns this statistics as the type provided typed argument.
|
boolean |
containsKey(java.lang.Object key) |
protected int |
deepHashCode() |
long |
get(java.lang.Object key)
Reference counter read operations
|
int |
getKeyCount() |
java.util.Set<java.lang.Object> |
getKeys() |
static StatisticSimpleWeakrefCounter |
getStatistics(java.lang.String name)
Create new statistic object with specified name or get the one already existing
|
java.util.Map<java.lang.Object,java.lang.Long> |
getValue()
Returns the value of this statistic.
|
boolean |
changedSinceCheckpoint()
Reports if value of refCounter has been changed since the last setCheckpoint() call.
|
boolean |
remove(java.lang.Object key,
boolean propagateDelete)
Return either the StatisticCounter for given key and remove it from the mapping or return null, if the key is not in the map
|
void |
reset()
Reset the current statistic (this one only).
|
void |
set(java.lang.Object key,
long value)
Reference counter modification operations
|
protected void |
setFrom(StatisticSimpleWeakrefCounter sourceStat)
Set the value of this statistic to the actual value of the given
sourceStat . |
void |
setCheckpoint()
Sets checkpoint.
|
void |
sub(java.lang.Object key) |
void |
sub(java.lang.Object key,
long value) |
java.lang.String |
toString()
Text representation
|
protected void |
updateFrom(StatisticSimpleWeakrefCounter sourceStat)
Statistics merging
|
addBoundStat, bindTo, canPerformOperation, disableGlobally, enableGlobally, getAllStatistics, getAllStatistics, getBoundStats, getBoundTo, getName, getStatistics, isBound, isEnabledGlobally, isRegisteredGlobally, printStatistics, printStatistics, printStatistics, readResolve, removeBoundStat, removeStatistic, resetStatistics, resetStatistics, unbind
protected transient java.util.Map<java.lang.Object,java.lang.Long> values
protected StatisticSimpleWeakrefCounter(java.lang.String name)
public long get(java.lang.Object key)
public java.util.Set<java.lang.Object> getKeys()
public int getKeyCount()
public boolean containsKey(java.lang.Object key)
public java.util.Map<java.lang.Object,java.lang.Long> getValue()
Statistics
getValue
in class Statistics<StatisticSimpleWeakrefCounter>
public void set(java.lang.Object key, long value)
public boolean remove(java.lang.Object key, boolean propagateDelete)
public void add(java.lang.Object key, long value)
public void add(java.lang.Object key)
public void sub(java.lang.Object key, long value)
public void sub(java.lang.Object key)
protected void updateFrom(StatisticSimpleWeakrefCounter sourceStat)
updateFrom
in class Statistics<StatisticSimpleWeakrefCounter>
sourceStat
- the statistic from which to update this statprotected void setFrom(StatisticSimpleWeakrefCounter sourceStat)
Statistics
sourceStat
.setFrom
in class Statistics<StatisticSimpleWeakrefCounter>
sourceStat
- the statistic from which to set this statpublic void reset()
reset
in class Statistics<StatisticSimpleWeakrefCounter>
public static StatisticSimpleWeakrefCounter getStatistics(java.lang.String name) throws java.lang.ClassCastException
java.lang.ClassCastException
public java.lang.String toString()
toString
in class java.lang.Object
protected int deepHashCode()
public boolean changedSinceCheckpoint()
public void setCheckpoint()
protected StatisticSimpleWeakrefCounter cast()
Statistics
cast
in class Statistics<StatisticSimpleWeakrefCounter>