Class AtomicLongLongAdder
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.concurrent.AtomicLongLongAdder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicLong
atomicLong
-
Constructor Summary
Constructors Constructor Description AtomicLongLongAdder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long x)
Add the given value.void
reset()
Resets the variables maintaining the sum to zero.long
sum()
Returns the current sum.long
sumThenReset()
Equivalent in effect toLongAdder.sum()
followed byLongAdder.reset()
.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.metrics.internal.concurrent.LongAdder
decrement, doubleValue, floatValue, increment, intValue, longValue
-
-
-
-
Method Detail
-
add
public void add(long x)
Description copied from interface:LongAdder
Add the given value.
-
sum
public long sum()
Description copied from interface:LongAdder
Returns the current sum.
-
reset
public void reset()
Description copied from interface:LongAdder
Resets the variables maintaining the sum to zero.
-
sumThenReset
public long sumThenReset()
Description copied from interface:LongAdder
Equivalent in effect toLongAdder.sum()
followed byLongAdder.reset()
.- Specified by:
sumThenReset
in interfaceLongAdder
- Returns:
- the sum
- See Also:
LongAdder.sumThenReset()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-