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 Modifier and Type Field Description static intCACHE_MSG_IDXMessage index.protected byteflagsCompressed boolean flags.protected longfutIdFuture version.protected UUIDnodeIdTarget node ID.protected GridCacheOperationopUpdate operation.protected CacheWriteSynchronizationModesyncModeWrite synchronization mode.protected inttaskNameHashTask name hash.protected AffinityTopologyVersiontopVerTopology 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 Modifier Constructor Description GridNearAtomicAbstractUpdateRequest()protectedGridNearAtomicAbstractUpdateRequest(int cacheId, UUID nodeId, long futId, @NotNull AffinityTopologyVersion topVer, CacheWriteSynchronizationMode syncMode, GridCacheOperation op, int taskNameHash, byte flags, boolean addDepInfo)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaddDeploymentInfo()Deployment enabled flag indicates whether deployment info has to be added to this message.abstract voidcleanup(boolean clearKeys)Cleanup values.abstract longconflictExpireTime(int idx)abstract longconflictTtl(int idx)abstract @Nullable GridCacheVersionconflictVersion(int idx)abstract @Nullable List<GridCacheVersion>conflictVersions()abstract javax.cache.processor.EntryProcessor<Object,Object,Object>entryProcessor(int idx)abstract javax.cache.expiry.ExpiryPolicyexpiry()bytefieldsCount()Gets fields count.abstract @Nullable CacheEntryPredicate[]filter()longfutureId()abstract @Nullable Object[]invokeArguments()booleankeepBinary()voidkeepBinary(boolean val)abstract KeyCacheObjectkey(int idx)abstract List<KeyCacheObject>keys()intlookupIndex()Gets message lookup index.IgniteLoggermessageLogger(GridCacheSharedContext ctx)booleannearCache()UUIDnodeId()booleanonResponse(GridNearAtomicUpdateResponse res)GridCacheOperationoperation()booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleanrecovery()voidrecovery(boolean val)@Nullable GridNearAtomicUpdateResponseresponse()booleanreturnValue()voidreturnValue(boolean val)abstract intsize()booleanskipStore()voidskipStore(boolean val)inttaskNameHash()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()abstract CacheObjectvalue(int idx)abstract List<?>values()CacheWriteSynchronizationModewriteSynchronizationMode()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.abstract CacheObjectwriteValue(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, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, 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.
-
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 @NotNull AffinityTopologyVersion topVer, CacheWriteSynchronizationMode syncMode, GridCacheOperation op, 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.taskNameHash- Task name hash code.flags- Flags.addDepInfo- Deployment info flag.
-
-
Method Detail
-
nearCache
public boolean nearCache()
- Returns:
Trueif 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:
topologyVersionin classGridCacheMessage- 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 toGridCacheMessage.MAX_CACHE_MSG_LOOKUP_INDEX.- Overrides:
lookupIndexin classGridCacheMessage- 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:
addDeploymentInfoin classGridCacheMessage- Returns:
trueor if deployment info must be added to the the message,falseotherwise.
-
messageLogger
public final IgniteLogger messageLogger(GridCacheSharedContext ctx)
- Overrides:
messageLoggerin classGridCacheMessage- Parameters:
ctx- Context.- Returns:
- Logger.
-
taskNameHash
public int taskNameHash()
- Returns:
- Task name hash code.
-
operation
public GridCacheOperation operation()
- Returns:
- Update opreation.
-
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:
Trueif current response wasnull.
-
response
@Nullable public @Nullable 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:
- Recovery flag.
-
recovery
public void recovery(boolean val)
- Parameters:
val- Recovery flag.
-
expiry
public abstract javax.cache.expiry.ExpiryPolicy expiry()
- Returns:
- Expiry policy.
-
filter
@Nullable public abstract @Nullable CacheEntryPredicate[] filter()
- Returns:
- Filter.
-
invokeArguments
@Nullable public abstract @Nullable 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 @Nullable List<GridCacheVersion> conflictVersions()
- Returns:
- Conflict versions.
-
conflictVersion
@Nullable public abstract @Nullable 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- Iftrueclears 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:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheIdMessage- Returns:
- Fields count.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridCacheIdMessage- 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:
readFromin interfaceMessage- Overrides:
readFromin classGridCacheIdMessage- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
toString
public String toString()
- Overrides:
toStringin classGridCacheIdMessage
-
-