org.apache.ignite.internal.processors.cache

## Class CacheInvokeDirectResult

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.CacheInvokeDirectResult

All Implemented Interfaces:
  Serializable, Message

    public class CacheInvokeDirectResult
    extends Object
    implements Message

See Also:
  Serialized Form

### Field Summary

### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`CacheInvokeDirectResult()` Required for `Message`.
`CacheInvokeDirectResult(KeyCacheObject key, CacheObject res)`
`CacheInvokeDirectResult(KeyCacheObject key, Exception err)`

### Method Summary

All Methods Instance Methods Concrete Methods
`short` `directType()` Gets message type.
`Exception` `error()`
`byte` `fieldsCount()` Gets fields count.
`void` `finishUnmarshal(GridCacheContext ctx, ClassLoader ldr)`
`KeyCacheObject` `key()`
`void` `onAckReceived()` Method called when ack message received.
`void` `prepareMarshal(GridCacheContext ctx)`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`CacheObject` `result()`
`String` `toString()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

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

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

### Constructor Detail

#### CacheInvokeDirectResult

    public CacheInvokeDirectResult()

Required for `Message`.

#### CacheInvokeDirectResult

    public CacheInvokeDirectResult(KeyCacheObject key,
                                   CacheObject res)

Parameters:
  `key` - Key.
  `res` - Result.

#### CacheInvokeDirectResult

    public CacheInvokeDirectResult(KeyCacheObject key,
                                   Exception err)

Parameters:
  `key` - Key.
  `err` - Exception thrown by `EntryProcessor.process(MutableEntry, Object...)`.

### Method Detail

#### key

    public KeyCacheObject key()

Returns:
  Key.

#### result

    public CacheObject result()

Returns:
  Result.

#### error

    @Nullable
    public Exception error()

Returns:
  Error.

#### prepareMarshal

    public void prepareMarshal(GridCacheContext ctx)
                        throws IgniteCheckedException

Parameters:
  `ctx` - Cache context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

    public void finishUnmarshal(GridCacheContext ctx,
                                ClassLoader ldr)
                         throws IgniteCheckedException

Parameters:
  `ctx` - Cache context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### onAckReceived

    public void onAckReceived()

Method called when ack message received.

Specified by:
  `onAckReceived` in interface `Message`

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                           MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                            MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018