Package io.lettuce.core.protocol
Class ReadOnlyCommands
- java.lang.Object
-
- io.lettuce.core.protocol.ReadOnlyCommands
-
public class ReadOnlyCommands extends Object
Contains all command names that are read-only commands.- Since:
- 6.2.5
- Author:
- Mark Paluch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ReadOnlyCommands.ReadOnlyPredicate
A predicate to determine whether a command qualifies as Read-Only command.
-
Constructor Summary
Constructors Constructor Description ReadOnlyCommands()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReadOnlyCommands.ReadOnlyPredicate
asPredicate()
Return aReadOnlyCommands.ReadOnlyPredicate
to test against the underlyingknown commands
.static Set<CommandType>
getReadOnlyCommands()
static boolean
isReadOnlyCommand(ProtocolKeyword protocolKeyword)
-
-
-
Method Detail
-
isReadOnlyCommand
public static boolean isReadOnlyCommand(ProtocolKeyword protocolKeyword)
- Parameters:
protocolKeyword
- must not benull
.- Returns:
true
ifProtocolKeyword
is a read-only command.
-
getReadOnlyCommands
public static Set<CommandType> getReadOnlyCommands()
-
asPredicate
public static ReadOnlyCommands.ReadOnlyPredicate asPredicate()
Return aReadOnlyCommands.ReadOnlyPredicate
to test against the underlyingknown commands
.- Returns:
- a
ReadOnlyCommands.ReadOnlyPredicate
to test against the underlyingknown commands
.
-
-