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 ofLongCounter
that is just anAtomicLong
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicLong
counter
-
Constructor Summary
Constructors Constructor Description AtomicLongCounter()
Creates anAtomicLongCounter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long delta)
Adds the delta to this counter.long
value()
Returns the value of this counter.
-
-
-
Constructor Detail
-
AtomicLongCounter
AtomicLongCounter()
Creates anAtomicLongCounter
.
-
-
Method Detail
-
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
-
-