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

## Class GridDhtAtomicAbstractUpdateRequest

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

All Implemented Interfaces:
  Serializable, GridCacheDeployable, Message

Direct Known Subclasses:
  GridDhtAtomicSingleUpdateRequest, GridDhtAtomicUpdateRequest

    public abstract class GridDhtAtomicAbstractUpdateRequest
    extends GridCacheMessage
    implements GridCacheDeployable

See Also:
  Serialized Form

### Field Summary

Fields
`static int` `CACHE_MSG_IDX` Message index.
`protected UUID` `nodeId` Node ID.

### 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
`protected` `GridDhtAtomicAbstractUpdateRequest()` Empty constructor required by `Externalizable`.
`protected` `GridDhtAtomicAbstractUpdateRequest(int cacheId, UUID nodeId)` Constructor.

### Method Summary

Methods
`boolean` `addDeploymentInfo()` Deployment enabled flag indicates whether deployment info has to be added to this message.
`abstract void` `addNearWriteValue(KeyCacheObject key, CacheObject val, javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor, long ttl, long expireTime)`
`abstract void` `addWriteValue(KeyCacheObject key, CacheObject val, javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor, long ttl, long conflictExpireTime, GridCacheVersion conflictVer, boolean addPrevVal, int partId, CacheObject prevVal, Long updateCntr)`
`protected abstract void` `cleanup()` Cleanup values not needed after message was sent.
`abstract long` `conflictExpireTime(int idx)`
`abstract GridCacheVersion` `conflictVersion(int idx)`
`abstract javax.cache.processor.EntryProcessor<Object,Object,Object>` `entryProcessor(int idx)`
`abstract boolean` `forceTransformBackups()`
`abstract GridCacheVersion` `futureVersion()`
`abstract boolean` `hasKey(KeyCacheObject key)`
`abstract Object[]` `invokeArguments()`
`abstract boolean` `keepBinary()`
`abstract KeyCacheObject` `key(int idx)`
`int` `lookupIndex()` Gets message lookup index.
`IgniteLogger` `messageLogger(GridCacheSharedContext ctx)`
`abstract javax.cache.processor.EntryProcessor<Object,Object,Object>` `nearEntryProcessor(int idx)`
`abstract long` `nearExpireTime(int idx)`
`abstract KeyCacheObject` `nearKey(int idx)`
`abstract int` `nearSize()`
`abstract long` `nearTtl(int idx)`
`abstract CacheObject` `nearValue(int idx)`
`UUID` `nodeId()`
`void` `onAckReceived()` Method called when ack message received.
`boolean` `onResponse()`
`abstract int` `partitionId(int idx)`
`abstract CacheObject` `previousValue(int idx)`
`abstract int` `size()`
`abstract boolean` `skipStore()`
`abstract UUID` `subjectId()`
`abstract int` `taskNameHash()`
`abstract long` `ttl(int idx)`
`abstract Long` `updateCounter(int updCntr)`
`abstract CacheObject` `value(int idx)`
`abstract CacheWriteSynchronizationMode` `writeSynchronizationMode()`
`abstract GridCacheVersion` `writeVersion()`

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

`cacheId, cacheId, classError, deployInfo, error, finishUnmarshal, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onClassError, partitionExchangeMessage, prepare, prepareMarshal, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, readFrom, topologyVersion, toString, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx, writeTo`

### 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, fieldsCount`

### Field Detail

#### CACHE_MSG_IDX

    public static final int CACHE_MSG_IDX

Message index.

#### nodeId

    protected UUID nodeId

Node ID.

### Constructor Detail

#### GridDhtAtomicAbstractUpdateRequest

    protected GridDhtAtomicAbstractUpdateRequest()

Empty constructor required by `Externalizable`.

#### GridDhtAtomicAbstractUpdateRequest

    protected GridDhtAtomicAbstractUpdateRequest(int cacheId,
                                      UUID nodeId)

Constructor.

Parameters:
  `cacheId` - Cache ID.
  `nodeId` - Node ID.

### 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()

Returns:
  Node ID.

#### keepBinary

    public abstract boolean keepBinary()

Returns:
  Keep binary flag.

#### skipStore

    public abstract boolean skipStore()

Returns:
  Skip write-through to a persistent storage.

#### onResponse

    public boolean onResponse()

Returns:
  `True` if on response flag changed.

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

#### forceTransformBackups

    public abstract boolean forceTransformBackups()

Returns:
  Force transform backups flag.

#### messageLogger

    public IgniteLogger messageLogger(GridCacheSharedContext ctx)

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

#### onAckReceived

    public void onAckReceived()

Method called when ack message received.

Specified by:
  `onAckReceived` in interface `Message`
Overrides:
  `onAckReceived` in class `GridCacheMessage`

#### addWriteValue

    public abstract void addWriteValue(KeyCacheObject key,
                     @Nullable
                     CacheObject val,
                     javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor,
                     long ttl,
                     long conflictExpireTime,
                     @Nullable
                     GridCacheVersion conflictVer,
                     boolean addPrevVal,
                     int partId,
                     @Nullable
                     CacheObject prevVal,
                     @Nullable
                     Long updateCntr)

Parameters:
  `key` - Key to add.
  `val` - Value, `null` if should be removed.
  `entryProcessor` - Entry processor.
  `ttl` - TTL (optional).
  `conflictExpireTime` - Conflict expire time (optional).
  `conflictVer` - Conflict version (optional).
  `addPrevVal` - If `true` adds previous value.
  `partId` - Partition.
  `prevVal` - Previous value.
  `updateCntr` - Update counter.

#### addNearWriteValue

    public abstract void addNearWriteValue(KeyCacheObject key,
                         @Nullable
                         CacheObject val,
                         javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor,
                         long ttl,
                         long expireTime)

Parameters:
  `key` - Key to add.
  `val` - Value, `null` if should be removed.
  `entryProcessor` - Entry processor.
  `ttl` - TTL.
  `expireTime` - Expire time.

#### cleanup

    protected abstract void cleanup()

Cleanup values not needed after message was sent.

#### subjectId

    public abstract UUID subjectId()

Returns:
  Subject ID.

#### taskNameHash

    public abstract int taskNameHash()

Returns:
  Task name.

#### futureVersion

    public abstract GridCacheVersion futureVersion()

Returns:
  Version assigned on primary node.

#### writeVersion

    public abstract GridCacheVersion writeVersion()

Returns:
  Write version.

#### writeSynchronizationMode

    public abstract CacheWriteSynchronizationMode writeSynchronizationMode()

Returns:
  Cache write synchronization mode.

#### size

    public abstract int size()

Returns:
  Keys size.

#### nearSize

    public abstract int nearSize()

Returns:
  Keys size.

#### hasKey

    public abstract boolean hasKey(KeyCacheObject key)

Parameters:
  `key` - Key to check.
Returns:
  `true` if request keys contain key.

#### key

    public abstract KeyCacheObject key(int idx)

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

#### partitionId

    public abstract int partitionId(int idx)

Parameters:
  `idx` - Partition index.
Returns:
  Partition id.

#### updateCounter

    public abstract Long updateCounter(int updCntr)

Parameters:
  `updCntr` - Update counter.
Returns:
  Update counter.

#### nearKey

    public abstract KeyCacheObject nearKey(int idx)

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

#### value

    @Nullable
    public abstract CacheObject value(int idx)

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

#### previousValue

    @Nullable
    public abstract CacheObject previousValue(int idx)

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

#### entryProcessor

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

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

#### nearValue

    @Nullable
    public abstract CacheObject nearValue(int idx)

Parameters:
  `idx` - Near key index.
Returns:
  Value.

#### nearEntryProcessor

    @Nullable
    public abstract javax.cache.processor.EntryProcessor<Object,Object,Object> nearEntryProcessor(int idx)

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

#### conflictVersion

    @Nullable
    public abstract GridCacheVersion conflictVersion(int idx)

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

#### ttl

    public abstract long ttl(int idx)

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

#### nearTtl

    public abstract long nearTtl(int idx)

Parameters:
  `idx` - Index.
Returns:
  TTL for near cache update.

#### conflictExpireTime

    public abstract long conflictExpireTime(int idx)

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

#### nearExpireTime

    public abstract long nearExpireTime(int idx)

Parameters:
  `idx` - Index.
Returns:
  Expire time for near cache update.

#### invokeArguments

    @Nullable
    public abstract Object[] invokeArguments()

Returns:
  Optional arguments for entry processor.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016