|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.Sample
org.javasimon.CounterSample
public class CounterSample
CounterSample.
| Field Summary | |
|---|---|
private long |
counter
|
private long |
decrementSum
|
private long |
incrementSum
|
private long |
max
|
private long |
maxTimestamp
|
private long |
min
|
private long |
minTimestamp
|
| Constructor Summary | |
|---|---|
CounterSample()
|
|
| Method Summary | |
|---|---|
String |
counterToString()
Equivalent to CounterImpl.toString() without state. |
long |
getCounter()
Returns the value of the counter. |
long |
getDecrementSum()
Returns the sum of all decremented values (as a positive number). |
long |
getIncrementSum()
Returns the sum of all incremented values. |
long |
getMax()
Returns maximal value of counter. |
long |
getMaxTimestamp()
Returns ms timestamp when the max value was reached. |
long |
getMin()
Returns minimal value of counter. |
long |
getMinTimestamp()
Returns ms timestamp when the min value was reached. |
String |
getTotalAsString()
Returns the total sum of increments and decrements as a formatted string (+inc/-dec). |
void |
setCounter(long counter)
Sets the value of the counter. |
void |
setDecrementSum(long decrementSum)
Sets the sum of all decremented values. |
void |
setIncrementSum(long incrementSum)
Sets the sum of all incremented values. |
void |
setMax(long max)
Sets the maximal value of the counter. |
void |
setMaxTimestamp(long maxTimestamp)
Sets ms timestamp when the max value was reached. |
void |
setMin(long min)
Sets the minimal value of the counter. |
void |
setMinTimestamp(long minTimestamp)
Sets ms timestamp when the min value was reached. |
String |
toString()
Returns readable representation of object. |
| Methods inherited from class org.javasimon.Sample |
|---|
finishWithUsagesAndNote, getFirstUsage, getLastReset, getLastUsage, getName, getNote, setFirstUsage, setLastReset, setLastUsage, setName, setNote, simonToString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private long counter
private long min
private long max
private long minTimestamp
private long maxTimestamp
private long incrementSum
private long decrementSum
| Constructor Detail |
|---|
public CounterSample()
| Method Detail |
|---|
public final long getCounter()
public final void setCounter(long counter)
counter - value of the counterpublic final long getMin()
public final void setMin(long min)
min - the minimal value of the counter.public final long getMax()
public final void setMax(long max)
max - the maximal value of the counter.public final long getMinTimestamp()
public final void setMinTimestamp(long minTimestamp)
minTimestamp - ms timestamp when the min value was reachedpublic final long getMaxTimestamp()
public final void setMaxTimestamp(long maxTimestamp)
maxTimestamp - ms timestamp when the max value was reachedpublic final long getIncrementSum()
public final void setIncrementSum(long incrementSum)
incrementSum - sum of all incremented valuespublic final long getDecrementSum()
public final void setDecrementSum(long decrementSum)
decrementSum - sum of all decremented valuespublic final String getTotalAsString()
public String toString()
toString in class Objectpublic String counterToString()
CounterImpl.toString() without state.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||