Class AtomicLongDoubleAdder
java.lang.Object
io.opentelemetry.sdk.metrics.internal.concurrent.AtomicLongDoubleAdder
- All Implemented Interfaces:
DoubleAdder
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x) Add the given value.voidreset()Resets the variables maintaining the sum to zero.doublesum()Returns the current sum.doubleEquivalent in effect toDoubleAdder.sum()followed byDoubleAdder.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.DoubleAdder
doubleValue, floatValue, intValue, longValue
-
Field Details
-
atomicLong
-
-
Constructor Details
-
AtomicLongDoubleAdder
AtomicLongDoubleAdder()
-
-
Method Details
-
add
public void add(double x) Description copied from interface:DoubleAdderAdd the given value.- Specified by:
addin interfaceDoubleAdder- Parameters:
x- the value to add- See Also:
-
sum
public double sum()Description copied from interface:DoubleAdderReturns the current sum.- Specified by:
sumin interfaceDoubleAdder- See Also:
-
reset
public void reset()Description copied from interface:DoubleAdderResets the variables maintaining the sum to zero.- Specified by:
resetin interfaceDoubleAdder- See Also:
-
sumThenReset
public double sumThenReset()Description copied from interface:DoubleAdderEquivalent in effect toDoubleAdder.sum()followed byDoubleAdder.reset().- Specified by:
sumThenResetin interfaceDoubleAdder- Returns:
- the sum
- See Also:
-
toString
-