Enum Class RedisStreamCommands.StreamEntryDeletionResult
java.lang.Object
java.lang.Enum<RedisStreamCommands.StreamEntryDeletionResult>
org.springframework.data.redis.connection.RedisStreamCommands.StreamEntryDeletionResult
- All Implemented Interfaces:
Serializable,Comparable<RedisStreamCommands.StreamEntryDeletionResult>,Constable
- Enclosing interface:
- RedisStreamCommands
public static enum RedisStreamCommands.StreamEntryDeletionResult
extends Enum<RedisStreamCommands.StreamEntryDeletionResult>
Result of a stream entry deletion operation for XDELEX and XACKDEL commands.
- Since:
- 4.1
- Author:
- Viktoriya Kutsarova
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe entry was successfully deleted from the stream.The entry was acknowledged but not deleted (when using ACKED deletion policy with dangling references).The entry ID does not exist in the stream. -
Method Summary
Modifier and TypeMethodDescriptionfromCode(long code) Convert a numeric code to aRedisStreamCommands.StreamEntryDeletionResult.longgetCode()Get the numeric code for this deletion result.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
NOT_FOUND
The entry ID does not exist in the stream. -
DELETED
The entry was successfully deleted from the stream. -
NOT_DELETED_UNACKNOWLEDGED_OR_STILL_REFERENCED
public static final RedisStreamCommands.StreamEntryDeletionResult NOT_DELETED_UNACKNOWLEDGED_OR_STILL_REFERENCEDThe entry was acknowledged but not deleted (when using ACKED deletion policy with dangling references).
-
-
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
-
getCode
public long getCode()Get the numeric code for this deletion result.- Returns:
- the numeric code: -1 for NOT_FOUND, 1 for DELETED, 2 for NOT_DELETED_UNACKNOWLEDGED_OR_STILL_REFERENCED
-
fromCode
Convert a numeric code to aRedisStreamCommands.StreamEntryDeletionResult.- Parameters:
code- the numeric code- Returns:
- the corresponding
RedisStreamCommands.StreamEntryDeletionResult - Throws:
IllegalArgumentException- if the code is not valid
-