org.apache.ignite.internal.processors.cache.distributed.dht.atomic

## Class GridNearAtomicAbstractUpdateRequest

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheMessage
  - - org.apache.ignite.internal.processors.cache.GridCacheIdMessage
    - - org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateRequest

All Implemented Interfaces:
  Serializable, GridCacheDeployable, Message

Direct Known Subclasses:
  GridNearAtomicAbstractSingleUpdateRequest, GridNearAtomicFullUpdateRequest

    public abstract class GridNearAtomicAbstractUpdateRequest
    extends GridCacheIdMessage
    implements GridCacheDeployable

See Also:
  Serialized Form

### Field Summary

Fields
`static int` `CACHE_MSG_IDX` Message index.
`protected byte` `flags` Compressed boolean flags.
`protected long` `futId` Future version.
`protected UUID` `nodeId` Target node ID.
`protected GridCacheOperation` `op` Update operation.
`protected UUID` `subjId` Subject ID.
`protected CacheWriteSynchronizationMode` `syncMode` Write synchronization mode.
`protected int` `taskNameHash` Task name hash.
`protected AffinityTopologyVersion` `topVer` Topology version.

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage

`cacheId`

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage

`addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX`

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

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
`` `GridNearAtomicAbstractUpdateRequest()`
`protected` `GridNearAtomicAbstractUpdateRequest(int cacheId, UUID nodeId, long futId, AffinityTopologyVersion topVer, CacheWriteSynchronizationMode syncMode, GridCacheOperation op, UUID subjId, int taskNameHash, byte flags, boolean addDepInfo)` Constructor.

### Method Summary

Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`abstract void` `cleanup(boolean clearKeys)` Cleanup values.
`abstract long` `conflictExpireTime(int idx)`
`abstract long` `conflictTtl(int idx)`
`abstract GridCacheVersion` `conflictVersion(int idx)`
`abstract List<GridCacheVersion>` `conflictVersions()`
`abstract javax.cache.processor.EntryProcessor<Object,Object,Object>` `entryProcessor(int idx)`
`abstract javax.cache.expiry.ExpiryPolicy` `expiry()`
`byte` `fieldsCount()` Gets fields count.
`abstract CacheEntryPredicate[]` `filter()`
`long` `futureId()`
`abstract Object[]` `invokeArguments()`
`boolean` `keepBinary()`
`void` `keepBinary(boolean val)`
`abstract KeyCacheObject` `key(int idx)`
`abstract List<KeyCacheObject>` `keys()`
`int` `lookupIndex()` Gets message lookup index.
`IgniteLogger` `messageLogger(GridCacheSharedContext ctx)`
`boolean` `nearCache()`
`UUID` `nodeId()`
`boolean` `onResponse(GridNearAtomicUpdateResponse res)`
`GridCacheOperation` `operation()`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`boolean` `recovery()`
`void` `recovery(boolean val)`
`GridNearAtomicUpdateResponse` `response()`
`boolean` `returnValue()`
`void` `returnValue(boolean val)`
`abstract int` `size()`
`boolean` `skipStore()`
`void` `skipStore(boolean val)`
`UUID` `subjectId()`
`int` `taskNameHash()`
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`abstract CacheObject` `value(int idx)`
`abstract List<?>` `values()`
`CacheWriteSynchronizationMode` `writeSynchronizationMode()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.
`abstract CacheObject` `writeValue(int idx)`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage

`cacheGroupMessage, cacheId, cacheId, handlerId`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage

`appendFlag, classError, deployInfo, error, finishUnmarshal, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshal, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx`

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.GridCacheDeployable

`deployInfo, prepare`

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

`directType`

### Field Detail

#### CACHE_MSG_IDX

    public static final int CACHE_MSG_IDX

Message index.

#### nodeId

    protected UUID nodeId

Target node ID.

#### futId

    protected long futId

Future version.

#### topVer

    protected AffinityTopologyVersion topVer

Topology version.

#### syncMode

    protected CacheWriteSynchronizationMode syncMode

Write synchronization mode.

#### op

    protected GridCacheOperation op

Update operation.

#### subjId

    protected UUID subjId

Subject ID.

#### taskNameHash

    protected int taskNameHash

Task name hash.

#### flags

    @GridToStringExclude
    protected byte flags

Compressed boolean flags. Make sure 'toString' is updated when add new flag.

### Constructor Detail

#### GridNearAtomicAbstractUpdateRequest

    public GridNearAtomicAbstractUpdateRequest()

#### GridNearAtomicAbstractUpdateRequest

    protected GridNearAtomicAbstractUpdateRequest(int cacheId,
                                       UUID nodeId,
                                       long futId,
                                       @NotNull
                                       AffinityTopologyVersion topVer,
                                       CacheWriteSynchronizationMode syncMode,
                                       GridCacheOperation op,
                                       @Nullable
                                       UUID subjId,
                                       int taskNameHash,
                                       byte flags,
                                       boolean addDepInfo)

Constructor.

Parameters:
  `cacheId` - Cache ID.
  `nodeId` - Node ID.
  `futId` - Future ID.
  `topVer` - Topology version.
  `syncMode` - Synchronization mode.
  `op` - Cache update operation.
  `subjId` - Subject ID.
  `taskNameHash` - Task name hash code.
  `flags` - Flags.
  `addDepInfo` - Deployment info flag.

### Method Detail

#### nearCache

    public boolean nearCache()

Returns:
  `True` if near cache is enabled on node initiated operation.

#### topologyVersion

    public final AffinityTopologyVersion topologyVersion()

Gets topology version or -1 in case of topology version is not required for this message.

Overrides:
  `topologyVersion` in class `GridCacheMessage`
Returns:
  Topology version.

#### lookupIndex

    public final int lookupIndex()

Gets message lookup index. All messages that does not return -1 in this method must return a unique number in range from 0 to `GridCacheMessage.MAX_CACHE_MSG_LOOKUP_INDEX`.

Overrides:
  `lookupIndex` in class `GridCacheMessage`
Returns:
  Message lookup index.

#### addDeploymentInfo

    public final boolean addDeploymentInfo()

Deployment enabled flag indicates whether deployment info has to be added to this message.

Specified by:
  `addDeploymentInfo` in class `GridCacheMessage`
Returns:
  `true` or if deployment info must be added to the the message, `false` otherwise.

#### messageLogger

    public final IgniteLogger messageLogger(GridCacheSharedContext ctx)

Overrides:
  `messageLogger` in class `GridCacheMessage`
Parameters:
  `ctx` - Context.
Returns:
  Logger.

#### taskNameHash

    public int taskNameHash()

Returns:
  Task name hash code.

#### operation

    public GridCacheOperation operation()

Returns:
  Update opreation.

#### subjectId

    public UUID subjectId()

Returns:
  Subject ID.

#### nodeId

    public UUID nodeId()

Returns:
  Target node ID.

#### futureId

    public long futureId()

Returns:
  Near node future ID.

#### writeSynchronizationMode

    public final CacheWriteSynchronizationMode writeSynchronizationMode()

Returns:
  Write synchronization mode.

#### onResponse

    public boolean onResponse(GridNearAtomicUpdateResponse res)

Parameters:
  `res` - Response.
Returns:
  `True` if current response was `null`.

#### response

    @Nullable
    public GridNearAtomicUpdateResponse response()

Returns:
  Response.

#### returnValue

    public final boolean returnValue()

Returns:
  Return value flag.

#### returnValue

    public final void returnValue(boolean val)

Parameters:
  `val` - Return value flag.

#### skipStore

    public final boolean skipStore()

Returns:
  Skip write-through to a persistent storage.

#### skipStore

    public void skipStore(boolean val)

Parameters:
  `val` - Skip store flag.

#### keepBinary

    public final boolean keepBinary()

Returns:
  Keep binary flag.

#### keepBinary

    public void keepBinary(boolean val)

Parameters:
  `val` - Keep binary flag.

#### recovery

    public final boolean recovery()

Returns:
  Keep binary flag.

#### recovery

    public void recovery(boolean val)

Parameters:
  `val` - Keep binary flag.

#### expiry

    public abstract javax.cache.expiry.ExpiryPolicy expiry()

Returns:
  Expiry policy.

#### filter

    @Nullable
    public abstract CacheEntryPredicate[] filter()

Returns:
  Filter.

#### invokeArguments

    @Nullable
    public abstract Object[] invokeArguments()

Returns:
  Optional arguments for entry processor.

#### keys

    public abstract List<KeyCacheObject> keys()

Returns:
  Keys for this update request.

#### values

    public abstract List<?> values()

Returns:
  Values for this update request.

#### value

    public abstract CacheObject value(int idx)

Parameters:
  `idx` - Key index.
Returns:
  Value.

#### entryProcessor

    public abstract javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor(int idx)

Parameters:
  `idx` - Key index.
Returns:
  Entry processor.

#### writeValue

    public abstract CacheObject writeValue(int idx)

Parameters:
  `idx` - Index to get.
Returns:
  Write value - either value, or transform closure.

#### conflictVersions

    @Nullable
    public abstract List<GridCacheVersion> conflictVersions()

Returns:
  Conflict versions.

#### conflictVersion

    @Nullable
    public abstract GridCacheVersion conflictVersion(int idx)

Parameters:
  `idx` - Index.
Returns:
  Conflict version.

#### conflictTtl

    public abstract long conflictTtl(int idx)

Parameters:
  `idx` - Index.
Returns:
  Conflict TTL.

#### conflictExpireTime

    public abstract long conflictExpireTime(int idx)

Parameters:
  `idx` - Index.
Returns:
  Conflict expire time.

#### cleanup

    public abstract void cleanup(boolean clearKeys)

Cleanup values.

Parameters:
  `clearKeys` - If `true` clears keys.

#### size

    public abstract int size()

Returns:
  Keys size.

#### key

    public abstract KeyCacheObject key(int idx)

Parameters:
  `idx` - Key index.
Returns:
  Key.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                  MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Overrides:
  `writeTo` in class `GridCacheIdMessage`
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`
Overrides:
  `readFrom` in class `GridCacheIdMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheIdMessage`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.1.0
Release Date | : July 20 2017