Package io.lettuce.core
Enum FunctionRestoreMode
- java.lang.Object
-
- java.lang.Enum<FunctionRestoreMode>
-
- io.lettuce.core.FunctionRestoreMode
-
- All Implemented Interfaces:
ProtocolKeyword
,Serializable
,Comparable<FunctionRestoreMode>
public enum FunctionRestoreMode extends Enum<FunctionRestoreMode> implements ProtocolKeyword
Restore mode forFUNCTION RESTORE
.- Since:
- 6.3
- Author:
- Mark Paluch
-
-
Enum Constant Summary
Enum Constants Enum Constant Description APPEND
Appends the restored libraries to the existing libraries and aborts on collision.FLUSH
Deletes all existing libraries before restoring the payload.REPLACE
Appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions.
-
Field Summary
Fields Modifier and Type Field Description byte[]
bytes
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes()
static FunctionRestoreMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static FunctionRestoreMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface io.lettuce.core.protocol.ProtocolKeyword
name
-
-
-
-
Enum Constant Detail
-
APPEND
public static final FunctionRestoreMode APPEND
Appends the restored libraries to the existing libraries and aborts on collision. This is the default policy.
-
FLUSH
public static final FunctionRestoreMode FLUSH
Deletes all existing libraries before restoring the payload.
-
REPLACE
public static final FunctionRestoreMode REPLACE
Appends the restored libraries to the existing libraries, replacing any existing ones in case of name collisions. Note that this policy doesn't prevent function name collisions, only libraries.
-
-
Method Detail
-
values
public static FunctionRestoreMode[] 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 (FunctionRestoreMode c : FunctionRestoreMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FunctionRestoreMode 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 nameNullPointerException
- if the argument is null
-
getBytes
public byte[] getBytes()
- Specified by:
getBytes
in interfaceProtocolKeyword
- Returns:
- byte[] encoded representation.
-
-