org.apache.ignite.internal.processors.rest.protocols.tcp

## 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
`static int` `BOOLEAN_FLAG` Boolean flag.
`static int` `BYTE_ARR_FLAG` Byte array flag.
`static int` `BYTE_FLAG` Byte flag.
`static int` `DATE_FLAG` Date flag.
`static int` `DOUBLE_FLAG` Double flag.
`static int` `FAILURE` Failure status.
`static byte` `FLAGS_LENGTH` Flags length.
`static int` `FLOAT_FLAG` Float flag.
`static int` `HDR_LEN` Header length.
`static byte` `IGNITE_HANDSHAKE_FLAG` Client handshake flag.
`static byte` `IGNITE_HANDSHAKE_RES_FLAG` Client handshake flag.
`static byte` `IGNITE_REQ_FLAG` Custom client request flag.
`static int` `INT_FLAG` Integer flag.
`static int` `KEY_NOT_FOUND` Key not found status.
`static int` `LONG_FLAG` Long flag.
`static byte` `MEMCACHE_REQ_FLAG` Memcache client request flag.
`static byte` `MEMCACHE_RES_FLAG` Response flag.
`static int` `SERIALIZED_FLAG` Serialized flag.
`static int` `SUCCESS` Success status.

### Method Summary

Methods
`boolean` `addData()`
`boolean` `addFlags()`
`String` `cacheName()`
`void` `cacheName(String cacheName)`
`UUID` `clientId()` Gets client identifier from which this request comes.
`void` `clientId(UUID id)` Sets client identifier from which this request comes.
`Long` `delta()`
`void` `delta(long delta)`
`UUID` `destinationId()` Gets identifier of the node where this message should be processed.
`void` `destinationId(UUID id)` Sets identifier of the node where this message should be eventually delivered.
`Long` `expiration()`
`void` `expiration(long expiration)`
`byte[]` `extras()`
`void` `extras(byte[] extras)`
`byte` `extrasLength()`
`void` `extrasLength(byte extrasLen)`
`boolean` `hasDelta()`
`boolean` `hasExpiration()`
`boolean` `hasFlags()`
`boolean` `hasInitial()`
`Long` `initial()`
`void` `initial(long init)`
`Object` `key()`
`void` `key(Object key)`
`short` `keyLength()`
`void` `keyLength(short keyLen)`
`byte[]` `opaque()`
`void` `opaque(byte[] opaque)`
`byte` `operationCode()`
`void` `operationCode(byte opCode)`
`byte` `requestFlag()`
`void` `requestFlag(byte reqFlag)`
`long` `requestId()` This method is used to match request and response messages.
`void` `requestId(long reqId)` Sets request id for outgoing packets.
`byte[]` `sessionToken()` Gets client session token.
`void` `sessionToken(byte[] sesTok)` Sets client session token.
`int` `status()`
`void` `status(int status)`
`String` `toString()`
`int` `totalLength()`
`void` `totalLength(int totalLen)`
`Object` `value()`
`void` `value(Object val)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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:
  `requestId` in interface `GridClientMessage`
Returns:
  request ID.

#### requestId

    public void requestId(long reqId)

Sets request id for outgoing packets.

Specified by:
  `requestId` in interface `GridClientMessage`
Parameters:
  `reqId` - request ID.

#### clientId

    public UUID clientId()

Gets client identifier from which this request comes.

Specified by:
  `clientId` in interface `GridClientMessage`
Returns:
  Client identifier.

#### clientId

    public void clientId(UUID id)

Sets client identifier from which this request comes.

Specified by:
  `clientId` in interface `GridClientMessage`
Parameters:
  `id` - Client identifier.

#### destinationId

    public UUID destinationId()

Gets identifier of the node where this message should be processed.

Specified by:
  `destinationId` in interface `GridClientMessage`
Returns:
  Client identifier.

#### destinationId

    public void destinationId(UUID id)

Sets identifier of the node where this message should be eventually delivered.

Specified by:
  `destinationId` in interface `GridClientMessage`
Parameters:
  `id` - Client identifier.

#### sessionToken

    public byte[] sessionToken()

Gets client session token.

Specified by:
  `sessionToken` in interface `GridClientMessage`
Returns:
  Session token.

#### sessionToken

    public void sessionToken(byte[] sesTok)

Sets client session token.

Specified by:
  `sessionToken` in interface `GridClientMessage`
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 Long expiration()

Returns:
  Expiration.

#### expiration

    public void expiration(long expiration)

Parameters:
  `expiration` - Expiration.

#### delta

    @Nullable
    public 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 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 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.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.2.0-incubating
Release Date | : June 16 2015