Package net.spy.memcached
Enum Class FailureMode
- All Implemented Interfaces:
Serializable
,Comparable<FailureMode>
,Constable
Failure modes for node failures.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAutomatically cancel all operations heading towards a downed node.Move on to functional nodes when nodes fail.Continue to retry a failing node until it comes back up. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FailureMode
Returns the enum constant of this class with the specified name.static FailureMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Redistribute
Move on to functional nodes when nodes fail.In this failure mode, the failure of a node will cause its current queue and future requests to move to the next logical node in the cluster for a given key.
-
Retry
Continue to retry a failing node until it comes back up.This failure mode is appropriate when you have a rare short downtime of a memcached node that will be back quickly, and your app is written to not wait very long for async command completion.
-
Cancel
Automatically cancel all operations heading towards a downed node.
-
-
Constructor Details
-
FailureMode
private FailureMode()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-