@InterfaceAudience.Private public final class NoOpRegionSizeStore extends Object implements RegionSizeStore
RegionSizeStore implementation that stores nothing.| Modifier and Type | Field and Description |
|---|---|
private static NoOpRegionSizeStore |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
private |
NoOpRegionSizeStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all entries from the store.
|
static NoOpRegionSizeStore |
getInstance() |
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, spliteratorprivate static final NoOpRegionSizeStore INSTANCE
private NoOpRegionSizeStore()
public static NoOpRegionSizeStore getInstance()
public Iterator<Map.Entry<RegionInfo,RegionSize>> iterator()
iterator in interface Iterable<Map.Entry<RegionInfo,RegionSize>>public long heapSize()
public RegionSize getRegionSize(RegionInfo regionInfo)
RegionSizeStorenull is
returned.getRegionSize in interface RegionSizeStoreregionInfo - The region whose size is being fetched.public void put(RegionInfo regionInfo, long size)
RegionSizeStoresize for a region.put in interface RegionSizeStoreregionInfo - An identifier for a region.size - The size in bytes of the region.public void incrementRegionSize(RegionInfo regionInfo, long delta)
RegionSizeStoreincrementRegionSize in interface RegionSizeStoreregionInfo - The region to update.delta - The change in size for the region, positive or negative.public RegionSize remove(RegionInfo regionInfo)
RegionSizeStoreremove in interface RegionSizeStoreregionInfo - The key to remove from the storepublic int size()
RegionSizeStoresize in interface RegionSizeStorepublic boolean isEmpty()
RegionSizeStoreisEmpty in interface RegionSizeStorepublic void clear()
RegionSizeStoreclear in interface RegionSizeStoreCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.