public class AtomicLongStat extends StatWithValueType<Long>
AtomicLong to be thread safe.definition| Constructor and Description |
|---|
AtomicLongStat(StatGroup group,
StatDefinition definition) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long count) |
void |
add(Stat<Long> other)
Add the value of "other" to this stat.
|
void |
clear()
Resets the statistic to its initial state.
|
Stat<Long> |
computeInterval(Stat<Long> base)
Compute interval value with respect to the base value.
|
AtomicLongStat |
copy()
Returns a copy of this statistic.
|
AtomicLongStat |
copyAndClear()
Return a copy of this stat, and clear the stat's value.
|
void |
decrement() |
Long |
get()
Returns the value of the statistic.
|
protected String |
getFormattedValue()
Returns the value of the statistic as a formatted string.
|
Class<Long> |
getValueType()
Returns the type of the value returned by the
BaseStat.get() method. |
void |
increment() |
boolean |
isNotSet()
Returns whether the statistic is in its initial state.
|
void |
negate()
Negate the value.
|
void |
set(Long newValue)
Set the stat value.
|
getForTypecopyAndAdd, getDefinition, toString, toStringVerbosepublic AtomicLongStat(StatGroup group, StatDefinition definition)
public Class<Long> getValueType()
StatWithValueTypeBaseStat.get() method.getValueType in class StatWithValueType<Long>public void increment()
public void decrement()
public void add(long count)
public void add(Stat<Long> other)
Statpublic void clear()
BaseStatpublic Stat<Long> computeInterval(Stat<Long> base)
StatcomputeInterval in class Stat<Long>public void negate()
Statpublic AtomicLongStat copy()
BaseStatpublic AtomicLongStat copyAndClear()
StatcopyAndClear in class Stat<Long>protected String getFormattedValue()
BaseStatgetFormattedValue in class BaseStat<Long>Copyright © 2024. All rights reserved.