Enum RecoveryStrategy

  • All Implemented Interfaces:
    Serializable, Comparable<RecoveryStrategy>

    public enum RecoveryStrategy
    extends Enum<RecoveryStrategy>
    Specifies the reaction which should be applied in case of previously saved state of bucket has been lost. The state of bucket can be lost by many reasons, for example:
    • Split-brain happen.
    • The bucket state was stored on single jvm node without replication strategy and this node was crashed.
    • Wrong cache configuration.
    • Pragmatically errors introduced by vendor.
    • Human mistake.
    Each time when DefaultBucketProxy detects that bucket state is missed, it applies this strategy to react.
    • Enum Constant Detail

      • RECONSTRUCT

        public static final RecoveryStrategy RECONSTRUCT
        Initialize bucket yet another time. Use this strategy if availability is more preferred than consistency.
      • THROW_BUCKET_NOT_FOUND_EXCEPTION

        public static final RecoveryStrategy THROW_BUCKET_NOT_FOUND_EXCEPTION
        Throw BucketNotFoundException. Use this strategy if consistency is more preferred than availability.
    • Method Detail

      • values

        public static RecoveryStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RecoveryStrategy c : RecoveryStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RecoveryStrategy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null