public class GridRedisProtocolParser extends Object
| Constructor and Description |
|---|
GridRedisProtocolParser() |
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
nil()
Creates Nil response.
|
static ByteBuffer |
oKString() |
static GridRedisMessage |
readArray(ByteBuffer buf)
Reads an array into
GridRedisMessage. |
static String |
readBulkStr(ByteBuffer buf)
Reads a bulk string.
|
static ByteBuffer |
toArray(Collection<Object> vals)
Converts a resultant collection response to an array.
|
static ByteBuffer |
toArray(Map<Object,Object> vals)
Converts a resultant map response to an array.
|
static ByteBuffer |
toBulkString(Object val)
Converts a resultant object to a bulk string.
|
static ByteBuffer |
toGenericError(String errMsg)
Creates a generic error response.
|
static ByteBuffer |
toInteger(int integer)
Converts an integer result to a RESP integer.
|
static ByteBuffer |
toInteger(String integer)
Converts an integer result to a RESP integer.
|
static ByteBuffer |
toOrderedArray(Map<Object,Object> vals,
List<?> origin)
Converts a resultant map response to an array,
the order of elements in the resulting array is defined by the order of elements in the
origin collection. |
static ByteBuffer |
toSimpleString(byte[] b)
Creates a simple string data as a
ByteBuffer. |
static ByteBuffer |
toSimpleString(String val)
Converts a simple string data to a
ByteBuffer. |
static ByteBuffer |
toTypeError(String errMsg)
Creates an error response on operation against the wrong data type.
|
public static GridRedisMessage readArray(ByteBuffer buf) throws IgniteCheckedException
GridRedisMessage.buf - Buffer.GridRedisMessage.IgniteCheckedExceptionpublic static String readBulkStr(ByteBuffer buf) throws IgniteCheckedException
buf - Buffer.IgniteCheckedExceptionpublic static ByteBuffer toSimpleString(String val)
ByteBuffer.val - String to be converted to a simple string.public static ByteBuffer toSimpleString(byte[] b)
ByteBuffer.b - Bytes for a simple string.public static ByteBuffer oKString()
public static ByteBuffer toGenericError(String errMsg)
errMsg - Error message.public static ByteBuffer toTypeError(String errMsg)
errMsg - Error message.public static ByteBuffer toInteger(String integer)
integer - Integer result.public static ByteBuffer toInteger(int integer)
integer - Integer result.public static ByteBuffer nil()
public static ByteBuffer toBulkString(Object val)
val - Object.public static ByteBuffer toArray(Map<Object,Object> vals)
vals - Map.public static ByteBuffer toOrderedArray(Map<Object,Object> vals, List<?> origin)
origin collection.vals - Map.origin - List that defines the order of the resulting array.public static ByteBuffer toArray(Collection<Object> vals)
vals - Array elements.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021