@InterfaceAudience.Private public class RegionSizeImpl extends Object implements RegionSize
Modifier and Type | Field and Description |
---|---|
private static long |
HEAP_SIZE |
private static org.slf4j.Logger |
LOG |
private AtomicLong |
size |
Constructor and Description |
---|
RegionSizeImpl(long initialSize) |
Modifier and Type | Method and Description |
---|---|
long |
getSize()
Returns the size of the region.
|
long |
heapSize()
Return the approximate 'exclusive deep size' of implementing object.
|
RegionSizeImpl |
incrementSize(long delta)
Atomically adds the provided
delta to the region size. |
RegionSizeImpl |
setSize(long newSize)
Updates the size of the Region.
|
private static final org.slf4j.Logger LOG
private static final long HEAP_SIZE
private final AtomicLong size
public RegionSizeImpl(long initialSize)
public long heapSize()
HeapSize
public RegionSizeImpl setSize(long newSize)
RegionSize
setSize
in interface RegionSize
newSize
- the new size of the Regionthis
public RegionSizeImpl incrementSize(long delta)
RegionSize
delta
to the region size.incrementSize
in interface RegionSize
delta
- The change in size in bytes of the region.this
public long getSize()
RegionSize
getSize
in interface RegionSize
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.