public class ResetOnSnapshotCounter extends Object implements WindowCounter
getSum().
Concurrency properties:
Usage recommendations:
SmoothlyDecayingRollingCounterSmoothlyDecayingRollingCounter| Constructor and Description |
|---|
ResetOnSnapshotCounter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long delta)
Increment the counter by
delta. |
long |
getSum()
Returns the counter's current value.
|
String |
toString() |
public void add(long delta)
WindowCounterdelta.
If You want to decrement instead of increment then use negative delta.add in interface WindowCounterdelta - the amount by which the counter will be increasedpublic long getSum()
WindowCountergetSum in interface WindowCounterCopyright © 2020. All rights reserved.