Package org.apache.hadoop.hbase.quotas
Class NoOpRegionSizeStore
java.lang.Object
org.apache.hadoop.hbase.quotas.NoOpRegionSizeStore
- All Implemented Interfaces:
Iterable<Map.Entry<RegionInfo,,RegionSize>> HeapSize,RegionSizeStore
A
RegionSizeStore implementation that stores nothing.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all entries from the store.static NoOpRegionSizeStoregetRegionSize(RegionInfo regionInfo) Returns the size for the give region if one exists.longheapSize()Return the approximate 'exclusive deep size' of implementing object.voidincrementRegionSize(RegionInfo regionInfo, long delta) Atomically alter the size of a region.booleanisEmpty()Returns if the store is empty.iterator()voidput(RegionInfo regionInfo, long size) Atomically sets the givensizefor a region.remove(RegionInfo regionInfo) Removes the mapping for the given key, returning the value if one exists in the store.intsize()Returns the number of entries in the store.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NoOpRegionSizeStore
private NoOpRegionSizeStore()
-
-
Method Details
-
getInstance
-
iterator
- Specified by:
iteratorin interfaceIterable<Map.Entry<RegionInfo,RegionSize>>
-
heapSize
Description copied from interface:HeapSizeReturn the approximate 'exclusive deep size' of implementing object. Includes count of payload and hosting object sizings. -
getRegionSize
Description copied from interface:RegionSizeStoreReturns the size for the give region if one exists. If no size exists,nullis returned.- Specified by:
getRegionSizein interfaceRegionSizeStore- Parameters:
regionInfo- The region whose size is being fetched.- Returns:
- The size in bytes of the region or null if no size is stored.
-
put
Description copied from interface:RegionSizeStoreAtomically sets the givensizefor a region.- Specified by:
putin interfaceRegionSizeStore- Parameters:
regionInfo- An identifier for a region.size- The size in bytes of the region.
-
incrementRegionSize
Description copied from interface:RegionSizeStoreAtomically alter the size of a region.- Specified by:
incrementRegionSizein interfaceRegionSizeStore- Parameters:
regionInfo- The region to update.delta- The change in size for the region, positive or negative.
-
remove
Description copied from interface:RegionSizeStoreRemoves the mapping for the given key, returning the value if one exists in the store.- Specified by:
removein interfaceRegionSizeStore- Parameters:
regionInfo- The key to remove from the store- Returns:
- The value removed from the store if one exists, otherwise null.
-
size
Description copied from interface:RegionSizeStoreReturns the number of entries in the store.- Specified by:
sizein interfaceRegionSizeStore- Returns:
- The number of entries in the store.
-
isEmpty
Description copied from interface:RegionSizeStoreReturns if the store is empty.- Specified by:
isEmptyin interfaceRegionSizeStore- Returns:
- true if there are no entries in the store, otherwise false.
-
clear
Description copied from interface:RegionSizeStoreRemoves all entries from the store.- Specified by:
clearin interfaceRegionSizeStore
-