Interface StorageTier


  • public interface StorageTier
    Represents a tier of storage, for example memory or SSD. It serves as a container of StorageDir which actually contains metadata information about blocks stored and space used/available.
    • Method Detail

      • getTierOrdinal

        int getTierOrdinal()
        Returns:
        the tier ordinal
      • getTierAlias

        java.lang.String getTierAlias()
        Returns:
        the tier alias
      • getCapacityBytes

        long getCapacityBytes()
        Returns:
        the capacity (in bytes)
      • getAvailableBytes

        long getAvailableBytes()
        Returns:
        the remaining capacity (in bytes)
      • getDir

        @Nullable
        StorageDir getDir​(int dirIndex)
        Returns a directory for the given index.
        Parameters:
        dirIndex - the directory index
        Returns:
        a directory, or null if the directory does not exist
      • getStorageDirs

        java.util.List<StorageDir> getStorageDirs()
        Returns:
        a list of directories in this tier
      • getLostStorage

        java.util.List<java.lang.String> getLostStorage()
        Returns:
        a list of lost storage paths
      • removeStorageDir

        void removeStorageDir​(StorageDir dir)
        Removes a directory.
        Parameters:
        dir - directory to be removed