public class GridDhtAtomicUpdateRequest extends GridDhtAtomicAbstractUpdateRequest
CACHE_MSG_IDX, DHT_ATOMIC_OBSOLETE_NEAR_KEY_FLAG_MASK, flags, futId, nodeId, subjId, syncMode, taskNameHash, topVer, writeVer
addDepInfo, CACHE_MSG_INDEX_FIELD_NAME, cacheId, forceAddDepInfo, MAX_CACHE_MSG_LOOKUP_INDEX
DIRECT_TYPE_SIZE
Constructor and Description |
---|
GridDhtAtomicUpdateRequest()
Empty constructor required by
Externalizable . |
GridDhtAtomicUpdateRequest(int cacheId,
UUID nodeId,
long futId,
GridCacheVersion writeVer,
CacheWriteSynchronizationMode syncMode,
AffinityTopologyVersion topVer,
UUID subjId,
int taskNameHash,
Object[] invokeArgs,
boolean addDepInfo,
boolean keepBinary,
boolean skipStore,
boolean forceTransformBackups)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addNearWriteValue(KeyCacheObject key,
CacheObject val,
javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor,
long ttl,
long expireTime) |
void |
addWriteValue(KeyCacheObject key,
CacheObject val,
javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor,
long ttl,
long conflictExpireTime,
GridCacheVersion conflictVer,
boolean addPrevVal,
CacheObject prevVal,
long updateCntr) |
protected void |
cleanup()
Cleanup values not needed after message was sent.
|
long |
conflictExpireTime(int idx) |
GridCacheVersion |
conflictVersion(int idx) |
short |
directType()
Gets message type.
|
javax.cache.processor.EntryProcessor<Object,Object,Object> |
entryProcessor(int idx) |
byte |
fieldsCount()
Gets fields count.
|
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. |
boolean |
forceTransformBackups() |
boolean |
hasKey(KeyCacheObject key) |
Object[] |
invokeArguments() |
KeyCacheObject |
key(int idx) |
javax.cache.processor.EntryProcessor<Object,Object,Object> |
nearEntryProcessor(int idx) |
long |
nearExpireTime(int idx) |
KeyCacheObject |
nearKey(int idx) |
int |
nearSize() |
long |
nearTtl(int idx) |
CacheObject |
nearValue(int idx) |
KeyCacheObject |
obsoleteNearKey(int idx) |
int |
obsoleteNearKeysSize() |
int |
partition() |
void |
prepareMarshal(GridCacheSharedContext ctx)
This method is called before the whole message is serialized
and is responsible for pre-marshalling state.
|
CacheObject |
previousValue(int idx) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
int |
size() |
AffinityTopologyVersion |
topologyVersion()
Gets topology version or -1 in case of topology version is not required for this message.
|
String |
toString() |
long |
ttl(int idx) |
Long |
updateCounter(int updCntr) |
CacheObject |
value(int idx) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
addDeploymentInfo, flags, futureId, keepBinary, lookupIndex, messageLogger, near, near, nearFutureId, nearNodeId, nodeId, onAckReceived, onResponse, setFlag, skipStore, subjectId, taskNameHash, writeSynchronizationMode, writeVersion
appendFlag, cacheId, cacheId, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, nextIndexId, onClassError, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
deployInfo, prepare
public GridDhtAtomicUpdateRequest()
Externalizable
.public GridDhtAtomicUpdateRequest(int cacheId, UUID nodeId, long futId, GridCacheVersion writeVer, CacheWriteSynchronizationMode syncMode, @NotNull AffinityTopologyVersion topVer, UUID subjId, int taskNameHash, Object[] invokeArgs, boolean addDepInfo, boolean keepBinary, boolean skipStore, boolean forceTransformBackups)
cacheId
- Cache ID.nodeId
- Node ID.futId
- Future ID.writeVer
- Write version for cache values.invokeArgs
- Optional arguments for entry processor.syncMode
- Cache write synchronization mode.topVer
- Topology version.forceTransformBackups
- Force transform backups flag.subjId
- Subject ID.taskNameHash
- Task name hash code.addDepInfo
- Deployment info.public void addWriteValue(KeyCacheObject key, @Nullable CacheObject val, javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor, long ttl, long conflictExpireTime, @Nullable GridCacheVersion conflictVer, boolean addPrevVal, @Nullable CacheObject prevVal, long updateCntr)
addWriteValue
in class GridDhtAtomicAbstractUpdateRequest
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.prevVal
- Previous value.updateCntr
- Update counter.public void addNearWriteValue(KeyCacheObject key, @Nullable CacheObject val, javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor, long ttl, long expireTime)
addNearWriteValue
in class GridDhtAtomicAbstractUpdateRequest
key
- Key to add.val
- Value, null
if should be removed.entryProcessor
- Entry processor.ttl
- TTL.expireTime
- Expire time.public boolean forceTransformBackups()
forceTransformBackups
in class GridDhtAtomicAbstractUpdateRequest
public AffinityTopologyVersion topologyVersion()
topologyVersion
in class GridCacheMessage
public int size()
size
in class GridDhtAtomicAbstractUpdateRequest
public int nearSize()
nearSize
in class GridDhtAtomicAbstractUpdateRequest
public int obsoleteNearKeysSize()
obsoleteNearKeysSize
in class GridDhtAtomicAbstractUpdateRequest
public KeyCacheObject obsoleteNearKey(int idx)
obsoleteNearKey
in class GridDhtAtomicAbstractUpdateRequest
idx
- Obsolete near cache key index.public boolean hasKey(KeyCacheObject key)
hasKey
in class GridDhtAtomicAbstractUpdateRequest
key
- Key to check.true
if request keys contain key.public KeyCacheObject key(int idx)
key
in class GridDhtAtomicAbstractUpdateRequest
idx
- Key index.public Long updateCounter(int updCntr)
updateCounter
in class GridDhtAtomicAbstractUpdateRequest
updCntr
- Update counter.public KeyCacheObject nearKey(int idx)
nearKey
in class GridDhtAtomicAbstractUpdateRequest
idx
- Near key index.@Nullable public CacheObject value(int idx)
value
in class GridDhtAtomicAbstractUpdateRequest
idx
- Key index.@Nullable public CacheObject previousValue(int idx)
previousValue
in class GridDhtAtomicAbstractUpdateRequest
idx
- Key index.@Nullable public javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor(int idx)
entryProcessor
in class GridDhtAtomicAbstractUpdateRequest
idx
- Key index.@Nullable public CacheObject nearValue(int idx)
nearValue
in class GridDhtAtomicAbstractUpdateRequest
idx
- Near key index.@Nullable public javax.cache.processor.EntryProcessor<Object,Object,Object> nearEntryProcessor(int idx)
nearEntryProcessor
in class GridDhtAtomicAbstractUpdateRequest
idx
- Key index.@Nullable public GridCacheVersion conflictVersion(int idx)
conflictVersion
in class GridDhtAtomicAbstractUpdateRequest
idx
- Index.public long ttl(int idx)
ttl
in class GridDhtAtomicAbstractUpdateRequest
idx
- Index.public long nearTtl(int idx)
nearTtl
in class GridDhtAtomicAbstractUpdateRequest
idx
- Index.public int partition()
partition
in class GridCacheMessage
-1
if it cannot be determined.public long conflictExpireTime(int idx)
conflictExpireTime
in class GridDhtAtomicAbstractUpdateRequest
idx
- Index.public long nearExpireTime(int idx)
nearExpireTime
in class GridDhtAtomicAbstractUpdateRequest
idx
- Index.@Nullable public Object[] invokeArguments()
invokeArguments
in class GridDhtAtomicAbstractUpdateRequest
public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException
prepareMarshal
in class GridCacheMessage
ctx
- Cache context.IgniteCheckedException
- If failed.public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException
GridCacheMessage.prepareMarshal(GridCacheSharedContext)
method.finishUnmarshal
in class GridCacheMessage
ctx
- Context.ldr
- Class loader.IgniteCheckedException
- If failed.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
writeTo
in interface Message
writeTo
in class GridDhtAtomicAbstractUpdateRequest
buf
- Byte buffer.writer
- Writer.public boolean readFrom(ByteBuffer buf, MessageReader reader)
readFrom
in interface Message
readFrom
in class GridDhtAtomicAbstractUpdateRequest
buf
- Byte buffer.reader
- Reader.protected void cleanup()
cleanup
in class GridDhtAtomicAbstractUpdateRequest
public short directType()
public byte fieldsCount()
fieldsCount
in interface Message
fieldsCount
in class GridDhtAtomicAbstractUpdateRequest
public String toString()
toString
in class GridDhtAtomicAbstractUpdateRequest
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017