Class JreLongAdder
java.lang.Object
io.opentelemetry.sdk.metrics.internal.concurrent.JreLongAdder
- All Implemented Interfaces:
LongAdder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long x) Add the given value.voidreset()Resets the variables maintaining the sum to zero.longsum()Returns the current sum.longEquivalent in effect toLongAdder.sum()followed byLongAdder.reset().toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.opentelemetry.sdk.metrics.internal.concurrent.LongAdder
decrement, doubleValue, floatValue, increment, intValue, longValue
-
Field Details
-
delegate
-
-
Constructor Details
-
JreLongAdder
JreLongAdder()
-
-
Method Details
-
add
public void add(long x) Description copied from interface:LongAdderAdd the given value. -
sum
public long sum()Description copied from interface:LongAdderReturns the current sum. -
reset
public void reset()Description copied from interface:LongAdderResets the variables maintaining the sum to zero. -
sumThenReset
public long sumThenReset()Description copied from interface:LongAdderEquivalent in effect toLongAdder.sum()followed byLongAdder.reset().- Specified by:
sumThenResetin interfaceLongAdder- Returns:
- the sum
- See Also:
-
toString
-