Package io.lettuce.core.protocol
Class CommandArgsAccessor
- java.lang.Object
-
- io.lettuce.core.protocol.CommandArgsAccessor
-
public class CommandArgsAccessor extends Object
Accessor for first encoded key, first string and firstinteger
argument ofCommandArgs
. 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
All Methods Static Methods Concrete Methods 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 firstinteger
argument.static <K,V>
StringgetFirstString(CommandArgs<K,V> commandArgs)
Get the firstString
argument.static <K,V>
List<String>getStringArguments(CommandArgs<K,V> commandArgs)
Get the allString
arguments.
-
-
-
Method Detail
-
encodeFirstKey
public static <K,V> ByteBuffer encodeFirstKey(CommandArgs<K,V> commandArgs)
Get the first encoded key for cluster command routing.- Parameters:
commandArgs
- must not be null.- Returns:
- the first encoded key or
null
.
-
getFirstString
public static <K,V> String getFirstString(CommandArgs<K,V> commandArgs)
Get the firstString
argument.- Parameters:
commandArgs
- must not be null.- Returns:
- the first
String
argument ornull
.
-
getFirstCharArray
public static <K,V> char[] getFirstCharArray(CommandArgs<K,V> commandArgs)
Get the firstchar[]
-array argument.- Parameters:
commandArgs
- must not be null.- Returns:
- the first
String
argument ornull
.
-
getStringArguments
public static <K,V> List<String> getStringArguments(CommandArgs<K,V> commandArgs)
Get the allString
arguments.- Parameters:
commandArgs
- must not be null.- Returns:
- the first
String
argument ornull
. - Since:
- 6.0
-
getCharArrayArguments
public static <K,V> List<char[]> getCharArrayArguments(CommandArgs<K,V> commandArgs)
Get the allchar[]
arguments.- Parameters:
commandArgs
- must not be null.- Returns:
- the first
String
argument ornull
. - Since:
- 6.0
-
getFirstInteger
public static <K,V> Long getFirstInteger(CommandArgs<K,V> commandArgs)
Get the firstinteger
argument.- Parameters:
commandArgs
- must not be null.- Returns:
- the first
integer
argument ornull
.
-
-