Package org.jctools.counters
Class FixedSizeStripedLongCounter
- java.lang.Object
-
- org.jctools.counters.FixedSizeStripedLongCounter
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
CACHE_LINE_IN_LONGS
protected long[]
cells
protected static long
COUNTER_ARRAY_BASE
protected static long
ELEMENT_SHIFT
protected int
mask
-
Constructor Summary
Constructors Constructor Description FixedSizeStripedLongCounter(int stripesCount)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description long
get()
long
getAndReset()
protected abstract long
getAndReset(long[] cells, long offset)
void
inc()
void
inc(long delta)
protected abstract void
inc(long[] cells, long offset, long value)
-
-
-
Method Detail
-
getAndReset
public long getAndReset()
- Specified by:
getAndReset
in interfaceCounter
-
inc
protected abstract void inc(long[] cells, long offset, long value)
-
getAndReset
protected abstract long getAndReset(long[] cells, long offset)
-
-