@InterfaceAudience.Private class ThreadSafeMemStoreSizing extends Object implements MemStoreSizing
NonThreadSafeMemStoreSizing
,
MemStoreSize
Modifier and Type | Field and Description |
---|---|
private AtomicInteger |
cellsCount |
private AtomicLong |
dataSize |
private AtomicLong |
heapSize |
private AtomicLong |
offHeapSize |
DUD
Constructor and Description |
---|
ThreadSafeMemStoreSizing() |
ThreadSafeMemStoreSizing(long dataSize,
long heapSize,
long offHeapSize,
int cellsCount) |
ThreadSafeMemStoreSizing(MemStoreSize mss) |
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSetDataSize(long expected,
long updated) |
int |
getCellsCount() |
long |
getDataSize() |
long |
getHeapSize() |
MemStoreSize |
getMemStoreSize() |
long |
getOffHeapSize() |
long |
incMemStoreSize(long dataSizeDelta,
long heapSizeDelta,
long offHeapSizeDelta,
int cellsCountDelta)
Returns The new dataSize ONLY as a convenience
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
decMemStoreSize, decMemStoreSize, incMemStoreSize
private final AtomicLong dataSize
private final AtomicLong heapSize
private final AtomicLong offHeapSize
private final AtomicInteger cellsCount
ThreadSafeMemStoreSizing()
ThreadSafeMemStoreSizing(MemStoreSize mss)
ThreadSafeMemStoreSizing(long dataSize, long heapSize, long offHeapSize, int cellsCount)
public MemStoreSize getMemStoreSize()
getMemStoreSize
in interface MemStoreSizing
MemStoreSizing.getDataSize()
,
MemStoreSizing.getHeapSize()
, and MemStoreSizing.getOffHeapSize()
, in the one go.public long incMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta)
MemStoreSizing
incMemStoreSize
in interface MemStoreSizing
public boolean compareAndSetDataSize(long expected, long updated)
compareAndSetDataSize
in interface MemStoreSizing
public long getDataSize()
getDataSize
in interface MemStoreSizing
public long getHeapSize()
getHeapSize
in interface MemStoreSizing
public long getOffHeapSize()
getOffHeapSize
in interface MemStoreSizing
public int getCellsCount()
getCellsCount
in interface MemStoreSizing
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.