Class AtomicLongLongAdder
java.lang.Object
io.opentelemetry.sdk.metrics.internal.concurrent.AtomicLongLongAdder
- All Implemented Interfaces:
LongAdder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long x) Add the given value.void
reset()
Resets the variables maintaining the sum to zero.long
sum()
Returns the current sum.long
Equivalent in effect toLongAdder.sum()
followed byLongAdder.reset()
.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
-
Field Details
-
atomicLong
-
-
Constructor Details
-
AtomicLongLongAdder
AtomicLongLongAdder()
-
-
Method Details
-
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:
-
toString
-