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 TypeMethodDescriptionvoid
add
(double x) Add the given value.void
reset()
Resets the variables maintaining the sum to zero.double
sum()
Returns the current sum.double
Equivalent in effect toDoubleAdder.sum()
followed byDoubleAdder.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.DoubleAdder
doubleValue, floatValue, intValue, longValue
-
Field Details
-
atomicLong
-
-
Constructor Details
-
AtomicLongDoubleAdder
AtomicLongDoubleAdder()
-
-
Method Details
-
add
public void add(double x) Description copied from interface:DoubleAdder
Add the given value.- Specified by:
add
in interfaceDoubleAdder
- Parameters:
x
- the value to add- See Also:
-
sum
public double sum()Description copied from interface:DoubleAdder
Returns the current sum.- Specified by:
sum
in interfaceDoubleAdder
- See Also:
-
reset
public void reset()Description copied from interface:DoubleAdder
Resets the variables maintaining the sum to zero.- Specified by:
reset
in interfaceDoubleAdder
- See Also:
-
sumThenReset
public double sumThenReset()Description copied from interface:DoubleAdder
Equivalent in effect toDoubleAdder.sum()
followed byDoubleAdder.reset()
.- Specified by:
sumThenReset
in interfaceDoubleAdder
- Returns:
- the sum
- See Also:
-
toString
-