Class StorageStatus


  • public final class StorageStatus
    extends Object
    Represents the current status of a storage with respect to its resources.
    • Method Detail

      • working

        public static StorageStatus working()
        Returns normal state.
        Returns:
        normal state
      • lockedDown

        public static StorageStatus lockedDown​(LocalizableMessage reason)
        Returns state for resources getting scarce.
        Parameters:
        reason - the message to forward
        Returns:
        state for resources getting scarce
      • unusable

        public static StorageStatus unusable​(LocalizableMessage reason)
        Returns state for no more resources.
        Parameters:
        reason - the message to forward
        Returns:
        state for no more resources
      • isLockedDown

        public boolean isLockedDown()
        Returns true if resources are getting scarce.
        Returns:
        true if resources are getting scarce
      • isWorking

        public boolean isWorking()
        Returns true if state is normal.
        Returns:
        true if state is normal
      • isUnusable

        public boolean isUnusable()
        Returns true if no more resources are available.
        Returns:
        true if no more resources are available
      • getReason

        public LocalizableMessage getReason()
        Returns the error message for non working states.
        Returns:
        the error message for non working states