Package io.grpc.internal
Class AtomicLongCounter
- java.lang.Object
-
- io.grpc.internal.AtomicLongCounter
-
- All Implemented Interfaces:
LongCounter
final class AtomicLongCounter extends java.lang.Object implements LongCounter
An implementation ofLongCounterthat is just anAtomicLong.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicLongcounter
-
Constructor Summary
Constructors Constructor Description AtomicLongCounter()Creates anAtomicLongCounter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long delta)Adds the delta to this counter.longvalue()Returns the value of this counter.
-
-
-
Constructor Detail
-
AtomicLongCounter
AtomicLongCounter()
Creates anAtomicLongCounter.
-
-
Method Detail
-
add
public void add(long delta)
Description copied from interface:LongCounterAdds the delta to this counter.- Specified by:
addin interfaceLongCounter
-
value
public long value()
Description copied from interface:LongCounterReturns the value of this counter.- Specified by:
valuein interfaceLongCounter
-
-