org.hbase.async
Class Counter
java.lang.Object
java.lang.Number
org.hbase.async.jsr166e.LongAdder
org.hbase.async.Counter
- All Implemented Interfaces:
- Serializable
public final class Counter
- extends LongAdder
An atomic counter to replace AtomicLong
.
This is based on JSR 166e's sharded counter, which is slated for JDK8.
This class is part of the public interface of asynchbase, and code
depending on asynchbase is encouraged to use it for their concurrent
counter needs.
- Since:
- 1.3
- See Also:
- Serialized Form
Method Summary |
long |
get()
Returns the current value of the counter. |
Methods inherited from class org.hbase.async.jsr166e.LongAdder |
add, decrement, doubleValue, floatValue, increment, intValue, longValue, reset, sum, sumThenReset, toString |
Counter
public Counter()
get
public final long get()
- Returns the current value of the counter.