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 SummaryFieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongFields inherited from interface org.apache.hadoop.hbase.regionserver.MemStoreSizingDUD
- 
Constructor SummaryConstructorsConstructorDescriptionThreadSafeMemStoreSizing(long dataSize, long heapSize, long offHeapSize, int cellsCount) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleancompareAndSetDataSize(long expected, long updated) intlonglonglonglongincMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Returns The new dataSize ONLY as a conveniencetoString()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.regionserver.MemStoreSizingdecMemStoreSize, decMemStoreSize, incMemStoreSize
- 
Field Details- 
dataSize
- 
heapSize
- 
offHeapSize
- 
cellsCount
 
- 
- 
Constructor Details- 
ThreadSafeMemStoreSizing
- 
ThreadSafeMemStoreSizing
- 
ThreadSafeMemStoreSizingThreadSafeMemStoreSizing(long dataSize, long heapSize, long offHeapSize, int cellsCount) 
 
- 
- 
Method Details- 
getMemStoreSize- Specified by:
- getMemStoreSizein interface- MemStoreSizing
- Returns:
- Use this datastructure to return all three settings, MemStoreSizing.getDataSize(),MemStoreSizing.getHeapSize(), andMemStoreSizing.getOffHeapSize(), in the one go.
 
- 
incMemStoreSizepublic long incMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Description copied from interface:MemStoreSizingReturns The new dataSize ONLY as a convenience- Specified by:
- incMemStoreSizein interface- MemStoreSizing
 
- 
compareAndSetDataSize- Specified by:
- compareAndSetDataSizein interface- MemStoreSizing
 
- 
getDataSize- Specified by:
- getDataSizein interface- MemStoreSizing
 
- 
getHeapSize- Specified by:
- getHeapSizein interface- MemStoreSizing
 
- 
getOffHeapSize- Specified by:
- getOffHeapSizein interface- MemStoreSizing
 
- 
getCellsCount- Specified by:
- getCellsCountin interface- MemStoreSizing
 
- 
toString
 
-