Class StoragePartitionDiskUsage


  • public class StoragePartitionDiskUsage
    extends java.lang.Object
    This class maintains in-memory partition usage. Triggered by size and/or time by #getUsage(), it will sync up with real disk usage.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(long recordSize)
      Adds a usage size to the partition
      long getUsage()  
      void syncWithDB()
      sync with real partition DB usage and reset in memory partition usage to be zero
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StoragePartitionDiskUsage

        public StoragePartitionDiskUsage​(int partition,
                                         AbstractStorageEngine storageEngine)
    • Method Detail

      • add

        public void add​(long recordSize)
        Adds a usage size to the partition
      • getUsage

        public long getUsage()
        Returns:
        the disk usage for this partition
      • syncWithDB

        public final void syncWithDB()
        sync with real partition DB usage and reset in memory partition usage to be zero