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

## Class GridNearAtomicFullUpdateRequest

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

All Implemented Interfaces:
  Serializable, GridCacheDeployable, Message

    public class GridNearAtomicFullUpdateRequest
    extends GridNearAtomicAbstractUpdateRequest

Lite DHT cache update request sent from near node to primary node.

See Also:
  Serialized Form

### Field Summary

Fields
`protected boolean` `clientReq`
`protected boolean` `fastMap` Fast map flag.
`protected boolean` `hasPrimary` Flag indicating whether request contains primary keys.
`protected boolean` `keepBinary` Keep binary flag.
`protected boolean` `retval` Return value flag.
`protected boolean` `skipStore` Skip write-through to a persistent storage.
`protected UUID` `subjId` Subject ID.
`protected int` `taskNameHash` Task name hash.
`protected boolean` `topLocked` Topology locked flag.

### Fields inherited from class org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateRequest

`CACHE_MSG_IDX`

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

`addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, cacheId, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX`

### Constructor Summary

Constructors
Constructor and Description
`GridNearAtomicFullUpdateRequest()` Empty constructor required by `Externalizable`.

### Method Summary

Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`void` `addUpdateEntry(KeyCacheObject key, Object val, long conflictTtl, long conflictExpireTime, GridCacheVersion conflictVer, boolean primary)`
`void` `cleanup(boolean clearKeys)` Cleanup values.
`boolean` `clientRequest()`
`long` `conflictExpireTime(int idx)`
`long` `conflictTtl(int idx)`
`GridCacheVersion` `conflictVersion(int idx)`
`List<GridCacheVersion>` `conflictVersions()`
`byte` `directType()` Gets message type.
`javax.cache.processor.EntryProcessor<Object,Object,Object>` `entryProcessor(int idx)`
`javax.cache.expiry.ExpiryPolicy` `expiry()`
`boolean` `fastMap()`
`byte` `fieldsCount()` Gets fields count.
`CacheEntryPredicate[]` `filter()`
`void` `finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr)` This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.
`GridCacheVersion` `futureVersion()`
`boolean` `hasPrimary()`
`Object[]` `invokeArguments()`
`boolean` `keepBinary()`
`KeyCacheObject` `key(int idx)`
`List<KeyCacheObject>` `keys()`
`int` `lookupIndex()` Gets message lookup index.
`IgniteLogger` `messageLogger(GridCacheSharedContext ctx)`
`UUID` `nodeId()`
`void` `nodeId(UUID nodeId)`
`boolean` `onResponse(GridNearAtomicUpdateResponse res)`
`GridCacheOperation` `operation()`
`int` `partition()`
`void` `prepareMarshal(GridCacheSharedContext ctx)` This method is called before the whole message is serialized and is responsible for pre-marshalling state.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`GridNearAtomicUpdateResponse` `response()`
`boolean` `returnValue()`
`int` `size()`
`boolean` `skipStore()`
`UUID` `subjectId()`
`int` `taskNameHash()`
`boolean` `topologyLocked()`
`AffinityTopologyVersion` `topologyVersion()` Gets topology version or -1 in case of topology version is not required for this message.
`String` `toString()`
`GridCacheVersion` `updateVersion()`
`CacheObject` `value(int idx)`
`List<?>` `values()`
`CacheWriteSynchronizationMode` `writeSynchronizationMode()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.
`CacheObject` `writeValue(int idx)`

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

`cacheId, cacheId, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onAckReceived, onClassError, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, 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`

### Field Detail

#### subjId

    protected UUID subjId

Subject ID.

#### taskNameHash

    protected int taskNameHash

Task name hash.

#### fastMap

    protected boolean fastMap

Fast map flag.

#### topLocked

    protected boolean topLocked

Topology locked flag. Set if atomic update is performed inside TX or explicit lock.

#### hasPrimary

    protected boolean hasPrimary

Flag indicating whether request contains primary keys.

#### skipStore

    protected boolean skipStore

Skip write-through to a persistent storage.

#### clientReq

    protected boolean clientReq

#### keepBinary

    protected boolean keepBinary

Keep binary flag.

#### retval

    protected boolean retval

Return value flag.

### Constructor Detail

#### GridNearAtomicFullUpdateRequest

    public GridNearAtomicFullUpdateRequest()

Empty constructor required by `Externalizable`.

### Method Detail

#### lookupIndex

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

#### nodeId

    public UUID nodeId()

Specified by:
  `nodeId` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Mapped node ID.

#### nodeId

    public void nodeId(UUID nodeId)

Specified by:
  `nodeId` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `nodeId` - Node ID.

#### subjectId

    public UUID subjectId()

Specified by:
  `subjectId` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Subject ID.

#### taskNameHash

    public int taskNameHash()

Specified by:
  `taskNameHash` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Task name hash.

#### futureVersion

    public GridCacheVersion futureVersion()

Specified by:
  `futureVersion` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Future version.

#### updateVersion

    public GridCacheVersion updateVersion()

Specified by:
  `updateVersion` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Update version for fast-map request.

#### topologyVersion

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

#### writeSynchronizationMode

    public CacheWriteSynchronizationMode writeSynchronizationMode()

Specified by:
  `writeSynchronizationMode` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Cache write synchronization mode.

#### operation

    public GridCacheOperation operation()

Specified by:
  `operation` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Update operation.

#### onResponse

    public boolean onResponse(GridNearAtomicUpdateResponse res)

Specified by:
  `onResponse` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `res` - Response.
Returns:
  `True` if current response was `null`.

#### response

    @Nullable
    public GridNearAtomicUpdateResponse response()

Specified by:
  `response` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Response.

#### addDeploymentInfo

    public 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 IgniteLogger messageLogger(GridCacheSharedContext ctx)

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

#### addUpdateEntry

    public void addUpdateEntry(KeyCacheObject key,
                      @Nullable
                      Object val,
                      long conflictTtl,
                      long conflictExpireTime,
                      @Nullable
                      GridCacheVersion conflictVer,
                      boolean primary)

Specified by:
  `addUpdateEntry` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `key` - Key to add.
  `val` - Optional update value.
  `conflictTtl` - Conflict TTL (optional).
  `conflictExpireTime` - Conflict expire time (optional).
  `conflictVer` - Conflict version (optional).
  `primary` - If given key is primary on this mapping.

#### keys

    public List<KeyCacheObject> keys()

Specified by:
  `keys` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Keys for this update request.

#### size

    public int size()

Specified by:
  `size` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Keys size.

#### key

    public KeyCacheObject key(int idx)

Specified by:
  `key` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Key index.
Returns:
  Key.

#### values

    public List<?> values()

Specified by:
  `values` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Values for this update request.

#### value

    public CacheObject value(int idx)

Specified by:
  `value` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Key index.
Returns:
  Value.

#### entryProcessor

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

Specified by:
  `entryProcessor` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Key index.
Returns:
  Entry processor.

#### writeValue

    public CacheObject writeValue(int idx)

Specified by:
  `writeValue` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Index to get.
Returns:
  Write value - either value, or transform closure.

#### conflictVersions

    @Nullable
    public List<GridCacheVersion> conflictVersions()

Specified by:
  `conflictVersions` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Conflict versions.

#### conflictVersion

    @Nullable
    public GridCacheVersion conflictVersion(int idx)

Specified by:
  `conflictVersion` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Index.
Returns:
  Conflict version.

#### conflictTtl

    public long conflictTtl(int idx)

Specified by:
  `conflictTtl` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Index.
Returns:
  Conflict TTL.

#### conflictExpireTime

    public long conflictExpireTime(int idx)

Specified by:
  `conflictExpireTime` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `idx` - Index.
Returns:
  Conflict expire time.

#### invokeArguments

    @Nullable
    public Object[] invokeArguments()

Specified by:
  `invokeArguments` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Optional arguments for entry processor.

#### fastMap

    public boolean fastMap()

Specified by:
  `fastMap` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Flag indicating whether this is fast-map udpate.

#### topologyLocked

    public boolean topologyLocked()

Specified by:
  `topologyLocked` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Topology locked flag.

#### clientRequest

    public boolean clientRequest()

Specified by:
  `clientRequest` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  `True` if request sent from client node.

#### returnValue

    public boolean returnValue()

Specified by:
  `returnValue` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Return value flag.

#### skipStore

    public boolean skipStore()

Specified by:
  `skipStore` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Skip write-through to a persistent storage.

#### keepBinary

    public boolean keepBinary()

Specified by:
  `keepBinary` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Keep binary flag.

#### hasPrimary

    public boolean hasPrimary()

Specified by:
  `hasPrimary` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Flag indicating whether this request contains primary keys.

#### filter

    @Nullable
    public CacheEntryPredicate[] filter()

Specified by:
  `filter` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Filter.

#### expiry

    public javax.cache.expiry.ExpiryPolicy expiry()

Specified by:
  `expiry` in class `GridNearAtomicAbstractUpdateRequest`
Returns:
  Expiry policy.

#### prepareMarshal

    public void prepareMarshal(GridCacheSharedContext ctx)
                        throws IgniteCheckedException

This method is called before the whole message is serialized and is responsible for pre-marshalling state.

Overrides:
  `prepareMarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Cache context.
Throws:
  `IgniteCheckedException` - If failed.

#### finishUnmarshal

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

This method is called after the message is deserialized and is responsible for unmarshalling state marshalled in `GridCacheMessage.prepareMarshal(GridCacheSharedContext)` method.

Overrides:
  `finishUnmarshal` in class `GridCacheMessage`
Parameters:
  `ctx` - Context.
  `ldr` - Class loader.
Throws:
  `IgniteCheckedException` - If failed.

#### partition

    public int partition()

Overrides:
  `partition` in class `GridCacheMessage`
Returns:
  Partition ID this message is targeted to or `-1` if it cannot be determined.

#### 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 `GridCacheMessage`
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 `GridCacheMessage`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### cleanup

    public void cleanup(boolean clearKeys)

Cleanup values.

Specified by:
  `cleanup` in class `GridNearAtomicAbstractUpdateRequest`
Parameters:
  `clearKeys` - If `true` clears keys.

#### directType

    public byte directType()

Gets message type.

Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Returns:
  Fields count.

#### toString

    public String toString()

Overrides:
  `toString` in class `GridCacheMessage`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017