Package io.grpc.internal
Class AtomicLongCounter
java.lang.Object
io.grpc.internal.AtomicLongCounter
- All Implemented Interfaces:
LongCounter
An implementation of
LongCounter
that is just an AtomicLong
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
counter
-
-
Constructor Details
-
AtomicLongCounter
AtomicLongCounter()Creates anAtomicLongCounter
.
-
-
Method Details
-
add
public void add(long delta) Description copied from interface:LongCounter
Adds the delta to this counter.- Specified by:
add
in interfaceLongCounter
-
value
public long value()Description copied from interface:LongCounter
Returns the value of this counter.- Specified by:
value
in interfaceLongCounter
-