Interface MemStoreSizing
- All Known Implementing Classes:
CellArrayImmutableSegment
,CellChunkImmutableSegment
,CompositeImmutableSegment
,CSLMImmutableSegment
,ImmutableSegment
,MutableSegment
,NonThreadSafeMemStoreSizing
,Segment
,ThreadSafeMemStoreSizing
Accounting of current heap and data sizes. Tracks 3 sizes:
-
data size: the aggregated size of all key-value not including meta data such as index,
time range etc.
- heap size: the aggregated size of all data that is allocated on-heap including all key-values that reside on-heap and the metadata that resides on-heap off-heap size: the aggregated size of all data that is allocated off-heap including all key-values that reside off-heap and the metadata that resides off-heap
Consider a store with 100MB of key-values allocated on-heap and 20MB of metadata allocated on-heap. The counters are <100MB, 120MB, 0>, respectively.
Consider a store with 100MB of key-values allocated off-heap and 20MB of metadata allocated on-heap (e.g, CAM index). The counters are <100MB, 20MB, 100MB>, respectively.
Consider a store with 100MB of key-values from which 95MB are allocated off-heap and 5MB are allocated on-heap (e.g., due to upserts) and 20MB of metadata from which 15MB allocated off-heap (e.g, CCM index) and 5MB allocated on-heap (e.g, CSLM index in active). The counters are <100MB, 10MB, 110MB>, respectively.
LikeTimeRangeTracker
, it has thread-safe and non-thread-safe implementations.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
compareAndSetDataSize
(long expected, long updated) default long
decMemStoreSize
(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Returns The new dataSize ONLY as a conveniencedefault long
decMemStoreSize
(MemStoreSize delta) int
long
long
long
long
incMemStoreSize
(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Returns The new dataSize ONLY as a conveniencedefault long
incMemStoreSize
(MemStoreSize delta)
-
Field Details
-
DUD
-
-
Method Details
-
incMemStoreSize
long incMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Returns The new dataSize ONLY as a convenience -
incMemStoreSize
-
decMemStoreSize
default long decMemStoreSize(long dataSizeDelta, long heapSizeDelta, long offHeapSizeDelta, int cellsCountDelta) Returns The new dataSize ONLY as a convenience -
decMemStoreSize
-
compareAndSetDataSize
-
getDataSize
long getDataSize() -
getHeapSize
long getHeapSize() -
getOffHeapSize
long getOffHeapSize() -
getCellsCount
int getCellsCount() -
getMemStoreSize
- Returns:
- Use this datastructure to return all three settings,
getDataSize()
,getHeapSize()
, andgetOffHeapSize()
, in the one go.
-