Interface RegionSizeStore

All Superinterfaces:
HeapSize, Iterable<Map.Entry<RegionInfo,RegionSize>>
All Known Implementing Classes:
NoOpRegionSizeStore, RegionSizeStoreImpl

@Private public interface RegionSizeStore extends Iterable<Map.Entry<RegionInfo,RegionSize>>, HeapSize
An interface for concurrently storing and updating the size of a Region.
  • Method Details

    • getRegionSize

      Returns the size for the give region if one exists. If no size exists, null is returned.
      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

      void put(RegionInfo regionInfo, long size)
      Atomically sets the given size for a region.
      Parameters:
      regionInfo - An identifier for a region.
      size - The size in bytes of the region.
    • incrementRegionSize

      void incrementRegionSize(RegionInfo regionInfo, long delta)
      Atomically alter the size of a region.
      Parameters:
      regionInfo - The region to update.
      delta - The change in size for the region, positive or negative.
    • remove

      Removes the mapping for the given key, returning the value if one exists in the store.
      Parameters:
      regionInfo - The key to remove from the store
      Returns:
      The value removed from the store if one exists, otherwise null.
    • size

      int size()
      Returns the number of entries in the store.
      Returns:
      The number of entries in the store.
    • isEmpty

      boolean isEmpty()
      Returns if the store is empty.
      Returns:
      true if there are no entries in the store, otherwise false.
    • clear

      void clear()
      Removes all entries from the store.