java.lang.Object
io.lettuce.core.protocol.CommandArgsAccessor
public class CommandArgsAccessor extends Object
Accessor for first encoded key, first string and first
integer argument of CommandArgs. This class is
part of the internal API and may change without further notice.- Since:
- 4.4
- Author:
- Mark Paluch
-
Constructor Summary
Constructors Constructor Description CommandArgsAccessor() -
Method Summary
Modifier and Type Method Description static <K, V> ByteBufferencodeFirstKey(CommandArgs<K,V> commandArgs)Get the first encoded key for cluster command routing.static <K, V> List<char[]>getCharArrayArguments(CommandArgs<K,V> commandArgs)Get the allchar[]arguments.static <K, V> char[]getFirstCharArray(CommandArgs<K,V> commandArgs)Get the firstchar[]-array argument.static <K, V> LonggetFirstInteger(CommandArgs<K,V> commandArgs)Get the firstintegerargument.static <K, V> StringgetFirstString(CommandArgs<K,V> commandArgs)Get the firstStringargument.static <K, V> List<String>getStringArguments(CommandArgs<K,V> commandArgs)Get the allStringarguments.
-
Constructor Details
-
CommandArgsAccessor
public CommandArgsAccessor()
-
-
Method Details
-
encodeFirstKey
Get the first encoded key for cluster command routing.- Parameters:
commandArgs- must not be null.- Returns:
- the first encoded key or
null.
-
getFirstString
Get the firstStringargument.- Parameters:
commandArgs- must not be null.- Returns:
- the first
Stringargument ornull.
-
getFirstCharArray
Get the firstchar[]-array argument.- Parameters:
commandArgs- must not be null.- Returns:
- the first
Stringargument ornull.
-
getStringArguments
Get the allStringarguments.- Parameters:
commandArgs- must not be null.- Returns:
- the first
Stringargument ornull. - Since:
- 6.0
-
getCharArrayArguments
Get the allchar[]arguments.- Parameters:
commandArgs- must not be null.- Returns:
- the first
Stringargument ornull. - Since:
- 6.0
-
getFirstInteger
Get the firstintegerargument.- Parameters:
commandArgs- must not be null.- Returns:
- the first
integerargument ornull.
-