@InterfaceAudience.Private public class RegionSizeStoreImpl extends Object implements RegionSizeStore
RegionSizeStore implementation backed by a ConcurrentHashMap. We expected similar
amounts of reads and writes to the "store", so using a RWLock is not going to provide any
exceptional gains.| 构造器和说明 |
|---|
RegionSizeStoreImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
Removes all entries from the store.
|
RegionSize |
getRegionSize(RegionInfo regionInfo)
Returns the size for the give region if one exists.
|
long |
heapSize() |
void |
incrementRegionSize(RegionInfo regionInfo,
long delta)
Atomically alter the size of a region.
|
boolean |
isEmpty()
Returns if the store is empty.
|
Iterator<Map.Entry<RegionInfo,RegionSize>> |
iterator() |
void |
put(RegionInfo regionInfo,
long size)
Atomically sets the given
size for a region. |
RegionSize |
remove(RegionInfo regionInfo)
Removes the mapping for the given key, returning the value if one exists in the store.
|
int |
size()
Returns the number of entries in the store.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic Iterator<Map.Entry<RegionInfo,RegionSize>> iterator()
iterator 在接口中 Iterable<Map.Entry<RegionInfo,RegionSize>>public RegionSize getRegionSize(RegionInfo regionInfo)
RegionSizeStorenull is
returned.getRegionSize 在接口中 RegionSizeStoreregionInfo - The region whose size is being fetched.public void put(RegionInfo regionInfo, long size)
RegionSizeStoresize for a region.put 在接口中 RegionSizeStoreregionInfo - An identifier for a region.size - The size in bytes of the region.public void incrementRegionSize(RegionInfo regionInfo, long delta)
RegionSizeStoreincrementRegionSize 在接口中 RegionSizeStoreregionInfo - The region to update.delta - The change in size for the region, positive or negative.public RegionSize remove(RegionInfo regionInfo)
RegionSizeStoreremove 在接口中 RegionSizeStoreregionInfo - The key to remove from the storepublic int size()
RegionSizeStoresize 在接口中 RegionSizeStorepublic boolean isEmpty()
RegionSizeStoreisEmpty 在接口中 RegionSizeStorepublic void clear()
RegionSizeStoreclear 在接口中 RegionSizeStoreCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.