Class ThreadSafeMemStoreSizing
java.lang.Object
org.apache.hadoop.hbase.regionserver.ThreadSafeMemStoreSizing
- All Implemented Interfaces:
MemStoreSizing
Accounting of current heap and data sizes. Thread-safe. Many threads can do updates against this
single instance.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AtomicInteger
private final AtomicLong
private final AtomicLong
private final AtomicLong
Fields inherited from interface org.apache.hadoop.hbase.regionserver.MemStoreSizing
DUD
-
Constructor Summary
ConstructorDescriptionThreadSafeMemStoreSizing
(long dataSize, long heapSize, long offHeapSize, int cellsCount) -
Method Summary
Modifier and TypeMethodDescriptionboolean
compareAndSetDataSize
(long expected, long updated) int
long
long
long
long
incMemStoreSize
(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Returns The new dataSize ONLY as a conveniencetoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.regionserver.MemStoreSizing
decMemStoreSize, decMemStoreSize, incMemStoreSize
-
Field Details
-
dataSize
-
heapSize
-
offHeapSize
-
cellsCount
-
-
Constructor Details
-
ThreadSafeMemStoreSizing
-
ThreadSafeMemStoreSizing
-
ThreadSafeMemStoreSizing
ThreadSafeMemStoreSizing(long dataSize, long heapSize, long offHeapSize, int cellsCount)
-
-
Method Details
-
getMemStoreSize
- Specified by:
getMemStoreSize
in interfaceMemStoreSizing
- Returns:
- Use this datastructure to return all three settings,
MemStoreSizing.getDataSize()
,MemStoreSizing.getHeapSize()
, andMemStoreSizing.getOffHeapSize()
, in the one go.
-
incMemStoreSize
public long incMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Description copied from interface:MemStoreSizing
Returns The new dataSize ONLY as a convenience- Specified by:
incMemStoreSize
in interfaceMemStoreSizing
-
compareAndSetDataSize
- Specified by:
compareAndSetDataSize
in interfaceMemStoreSizing
-
getDataSize
- Specified by:
getDataSize
in interfaceMemStoreSizing
-
getHeapSize
- Specified by:
getHeapSize
in interfaceMemStoreSizing
-
getOffHeapSize
- Specified by:
getOffHeapSize
in interfaceMemStoreSizing
-
getCellsCount
- Specified by:
getCellsCount
in interfaceMemStoreSizing
-
toString
-