Class GridMemcachedMessage
- java.lang.Object
-
- org.apache.ignite.internal.processors.rest.protocols.tcp.GridMemcachedMessage
-
- All Implemented Interfaces:
Serializable,GridClientMessage
public class GridMemcachedMessage extends Object implements GridClientMessage
Memcached protocol request.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intBOOLEAN_FLAGBoolean flag.static intBYTE_ARR_FLAGByte array flag.static intBYTE_FLAGByte flag.static intDATE_FLAGDate flag.static intDOUBLE_FLAGDouble flag.static intFAILUREFailure status.static byteFLAGS_LENGTHFlags length.static intFLOAT_FLAGFloat flag.static intHDR_LENHeader length.static byteIGNITE_HANDSHAKE_FLAGClient handshake flag.static byteIGNITE_HANDSHAKE_RES_FLAGClient handshake flag.static byteIGNITE_REQ_FLAGCustom client request flag.static intINT_FLAGInteger flag.static intKEY_NOT_FOUNDKey not found status.static intLONG_FLAGLong flag.static byteMEMCACHE_REQ_FLAGMemcache client request flag.static byteMEMCACHE_RES_FLAGResponse flag.static intSERIALIZED_FLAGSerialized flag.static intSUCCESSSuccess status.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddData()booleanaddFlags()@Nullable StringcacheName()voidcacheName(String cacheName)UUIDclientId()Gets client identifier from which this request comes.voidclientId(UUID id)Sets client identifier from which this request comes.@Nullable Longdelta()voiddelta(long delta)UUIDdestinationId()Gets identifier of the node where this message should be processed.voiddestinationId(UUID id)Sets identifier of the node where this message should be eventually delivered.@Nullable Longexpiration()voidexpiration(long expiration)byte[]extras()voidextras(byte[] extras)byteextrasLength()voidextrasLength(byte extrasLen)booleanhasDelta()booleanhasExpiration()booleanhasFlags()booleanhasInitial()@Nullable Longinitial()voidinitial(long init)Objectkey()voidkey(Object key)shortkeyLength()voidkeyLength(short keyLen)byte[]opaque()voidopaque(byte[] opaque)byteoperationCode()voidoperationCode(byte opCode)byterequestFlag()voidrequestFlag(byte reqFlag)longrequestId()This method is used to match request and response messages.voidrequestId(long reqId)Sets request id for outgoing packets.byte[]sessionToken()Gets client session token.voidsessionToken(byte[] sesTok)Sets client session token.intstatus()voidstatus(int status)StringtoString()inttotalLength()voidtotalLength(int totalLen)Objectvalue()voidvalue(Object val)
-
-
-
Field Detail
-
HDR_LEN
public static final int HDR_LEN
Header length.- See Also:
- Constant Field Values
-
FLAGS_LENGTH
public static final byte FLAGS_LENGTH
Flags length.- See Also:
- Constant Field Values
-
MEMCACHE_REQ_FLAG
public static final byte MEMCACHE_REQ_FLAG
Memcache client request flag.- See Also:
- Constant Field Values
-
MEMCACHE_RES_FLAG
public static final byte MEMCACHE_RES_FLAG
Response flag.- See Also:
- Constant Field Values
-
IGNITE_REQ_FLAG
public static final byte IGNITE_REQ_FLAG
Custom client request flag.- See Also:
- Constant Field Values
-
IGNITE_HANDSHAKE_FLAG
public static final byte IGNITE_HANDSHAKE_FLAG
Client handshake flag.- See Also:
- Constant Field Values
-
IGNITE_HANDSHAKE_RES_FLAG
public static final byte IGNITE_HANDSHAKE_RES_FLAG
Client handshake flag.- See Also:
- Constant Field Values
-
SUCCESS
public static final int SUCCESS
Success status.- See Also:
- Constant Field Values
-
KEY_NOT_FOUND
public static final int KEY_NOT_FOUND
Key not found status.- See Also:
- Constant Field Values
-
FAILURE
public static final int FAILURE
Failure status.- See Also:
- Constant Field Values
-
SERIALIZED_FLAG
public static final int SERIALIZED_FLAG
Serialized flag.- See Also:
- Constant Field Values
-
BOOLEAN_FLAG
public static final int BOOLEAN_FLAG
Boolean flag.- See Also:
- Constant Field Values
-
INT_FLAG
public static final int INT_FLAG
Integer flag.- See Also:
- Constant Field Values
-
LONG_FLAG
public static final int LONG_FLAG
Long flag.- See Also:
- Constant Field Values
-
DATE_FLAG
public static final int DATE_FLAG
Date flag.- See Also:
- Constant Field Values
-
BYTE_FLAG
public static final int BYTE_FLAG
Byte flag.- See Also:
- Constant Field Values
-
FLOAT_FLAG
public static final int FLOAT_FLAG
Float flag.- See Also:
- Constant Field Values
-
DOUBLE_FLAG
public static final int DOUBLE_FLAG
Double flag.- See Also:
- Constant Field Values
-
BYTE_ARR_FLAG
public static final int BYTE_ARR_FLAG
Byte array flag.- See Also:
- Constant Field Values
-
-
Method Detail
-
requestId
public long requestId()
This method is used to match request and response messages.- Specified by:
requestIdin interfaceGridClientMessage- Returns:
- request ID.
-
requestId
public void requestId(long reqId)
Sets request id for outgoing packets.- Specified by:
requestIdin interfaceGridClientMessage- Parameters:
reqId- request ID.
-
clientId
public UUID clientId()
Gets client identifier from which this request comes.- Specified by:
clientIdin interfaceGridClientMessage- Returns:
- Client identifier.
-
clientId
public void clientId(UUID id)
Sets client identifier from which this request comes.- Specified by:
clientIdin interfaceGridClientMessage- Parameters:
id- Client identifier.
-
destinationId
public UUID destinationId()
Gets identifier of the node where this message should be processed.- Specified by:
destinationIdin interfaceGridClientMessage- Returns:
- Client identifier.
-
destinationId
public void destinationId(UUID id)
Sets identifier of the node where this message should be eventually delivered.- Specified by:
destinationIdin interfaceGridClientMessage- Parameters:
id- Client identifier.
-
sessionToken
public byte[] sessionToken()
Gets client session token.- Specified by:
sessionTokenin interfaceGridClientMessage- Returns:
- Session token.
-
sessionToken
public void sessionToken(byte[] sesTok)
Sets client session token.- Specified by:
sessionTokenin interfaceGridClientMessage- Parameters:
sesTok- Session token.
-
requestFlag
public byte requestFlag()
- Returns:
- Request flag.
-
requestFlag
public void requestFlag(byte reqFlag)
- Parameters:
reqFlag- Request flag.
-
operationCode
public byte operationCode()
- Returns:
- Operation code.
-
operationCode
public void operationCode(byte opCode)
- Parameters:
opCode- Operation code.
-
keyLength
public short keyLength()
- Returns:
- Key length.
-
keyLength
public void keyLength(short keyLen)
- Parameters:
keyLen- Key length.
-
extrasLength
public byte extrasLength()
- Returns:
- Extras length.
-
extrasLength
public void extrasLength(byte extrasLen)
- Parameters:
extrasLen- Extras length.
-
status
public int status()
- Returns:
- Status.
-
status
public void status(int status)
- Parameters:
status- Status.
-
totalLength
public int totalLength()
- Returns:
- Total length.
-
totalLength
public void totalLength(int totalLen)
- Parameters:
totalLen- Total length.
-
opaque
public byte[] opaque()
- Returns:
- Opaque.
-
opaque
public void opaque(byte[] opaque)
- Parameters:
opaque- Opaque.
-
extras
public byte[] extras()
- Returns:
- Extras.
-
extras
public void extras(byte[] extras)
- Parameters:
extras- Extras.
-
key
public Object key()
- Returns:
- Key.
-
key
public void key(Object key)
- Parameters:
key- Key.
-
value
public Object value()
- Returns:
- Value.
-
value
public void value(Object val)
- Parameters:
val- Value.
-
expiration
@Nullable public @Nullable Long expiration()
- Returns:
- Expiration.
-
expiration
public void expiration(long expiration)
- Parameters:
expiration- Expiration.
-
delta
@Nullable public @Nullable Long delta()
- Returns:
- Delta for increment and decrement commands.
-
delta
public void delta(long delta)
- Parameters:
delta- Delta for increment and decrement commands.
-
initial
@Nullable public @Nullable Long initial()
- Returns:
- Initial value for increment and decrement commands.
-
initial
public void initial(long init)
- Parameters:
init- Initial value for increment and decrement commands.
-
cacheName
@Nullable public @Nullable String cacheName()
- Returns:
- Cache name.
-
cacheName
public void cacheName(String cacheName)
- Parameters:
cacheName- Cache name.
-
hasFlags
public boolean hasFlags()
- Returns:
- Whether request MUST have flags in extras.
-
hasExpiration
public boolean hasExpiration()
- Returns:
- Whether request has expiration field.
-
hasDelta
public boolean hasDelta()
- Returns:
- Whether request has delta field.
-
hasInitial
public boolean hasInitial()
- Returns:
- Whether request has initial field.
-
addData
public boolean addData()
- Returns:
- Whether to add data to response.
-
addFlags
public boolean addFlags()
- Returns:
- Whether to add flags to response.
-
-