|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.statistics.Statistics<StatisticCounter>
messif.statistics.StatisticCounter
public final class StatisticCounter
Field Summary | |
---|---|
protected long |
value
|
Fields inherited from class messif.statistics.Statistics |
---|
replaceWith |
Constructor Summary | |
---|---|
protected |
StatisticCounter(java.lang.String name)
Creates a new instance of StatisticCounter |
protected |
StatisticCounter(java.lang.String name,
long value)
Creates a new instance of StatisticCounter |
Method Summary | |
---|---|
void |
add()
|
void |
add(long value)
|
protected StatisticCounter |
cast()
Returns this statistics as the type provided typed argument. |
long |
get()
|
static StatisticCounter |
getStatistics(java.lang.String name)
Create new statistic counter with specified name or get the one already existing |
boolean |
changedSinceCheckpoint()
Reports if value of counter has been changed since the last setCheckpoint() call. |
void |
max(long value)
|
void |
min(long value)
|
void |
reset()
Reset the current statistic (this one only). |
void |
set(long value)
|
protected void |
setFrom(StatisticCounter sourceStat)
Set the value of this statistic to the actual value of the given sourceStat . |
void |
setCheckpoint()
Sets checkpoint. |
void |
sub()
|
void |
sub(long value)
|
java.lang.String |
toString()
|
protected void |
updateFrom(StatisticCounter sourceStat)
Updates the value of this statistic from the given sourceStat . |
Methods inherited from class messif.statistics.Statistics |
---|
addBoundStat, bindTo, canPerformOperation, disableGlobally, enableGlobally, getAllStatistics, getAllStatistics, getBoundStats, getBoundTo, getName, getStatistics, isBound, isEnabledGlobally, isRegisteredGlobally, printStatistics, printStatistics, printStatistics, readResolve, removeBoundStat, removeStatistic, resetStatistics, resetStatistics, unbind |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected long value
Constructor Detail |
---|
protected StatisticCounter(java.lang.String name)
protected StatisticCounter(java.lang.String name, long value)
Method Detail |
---|
protected StatisticCounter cast()
Statistics
cast
in class Statistics<StatisticCounter>
public void set(long value)
public void add(long value)
public void add()
public void sub(long value)
public void sub()
public long get()
public void max(long value)
public void min(long value)
protected void updateFrom(StatisticCounter sourceStat)
Statistics
sourceStat
.
Specifically, this method merges the value of the sourceStat
with this statistic.
The actual implementation depends on the type of the statistic.
updateFrom
in class Statistics<StatisticCounter>
sourceStat
- the statistic from which to update this statprotected void setFrom(StatisticCounter sourceStat)
Statistics
sourceStat
.
setFrom
in class Statistics<StatisticCounter>
sourceStat
- the statistic from which to set this statpublic void reset()
reset
in class Statistics<StatisticCounter>
public static StatisticCounter getStatistics(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean changedSinceCheckpoint()
public void setCheckpoint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |