Class RegionSizeImpl

java.lang.Object
org.apache.hadoop.hbase.quotas.RegionSizeImpl
All Implemented Interfaces:
HeapSize, RegionSize

@Private public class RegionSizeImpl extends Object implements RegionSize
An object encapsulating a Region's size and whether it's been reported to the master since the value last changed.
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • HEAP_SIZE

      private static final long HEAP_SIZE
    • size

      private final AtomicLong size
  • Constructor Details

  • Method Details

    • heapSize

      public long heapSize()
      Description copied from interface: HeapSize
      Return the approximate 'exclusive deep size' of implementing object. Includes count of payload and hosting object sizings.
      Specified by:
      heapSize in interface HeapSize
    • setSize

      public RegionSizeImpl setSize(long newSize)
      Description copied from interface: RegionSize
      Updates the size of the Region.
      Specified by:
      setSize in interface RegionSize
      Parameters:
      newSize - the new size of the Region
      Returns:
      this
    • incrementSize

      public RegionSizeImpl incrementSize(long delta)
      Description copied from interface: RegionSize
      Atomically adds the provided delta to the region size.
      Specified by:
      incrementSize in interface RegionSize
      Parameters:
      delta - The change in size in bytes of the region.
      Returns:
      this
    • getSize

      public long getSize()
      Description copied from interface: RegionSize
      Returns the size of the region.
      Specified by:
      getSize in interface RegionSize
      Returns:
      The size in bytes.