Class GridDistributedBaseMessage
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridDistributedBaseMessage
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,GridCacheVersionable,Message
- Direct Known Subclasses:
GridCacheTxRecoveryRequest,GridCacheTxRecoveryResponse,GridDistributedLockRequest,GridDistributedLockResponse,GridDistributedTxFinishRequest,GridDistributedTxPrepareRequest,GridDistributedTxPrepareResponse,GridDistributedUnlockRequest
public abstract class GridDistributedBaseMessage extends GridCacheIdMessage implements GridCacheDeployable, GridCacheVersionable
Base for all messages in replicated cache.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected GridCacheVersionverLock or transaction 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 protectedGridDistributedBaseMessage()Empty constructor required byExternalizableprotectedGridDistributedBaseMessage(int cnt, boolean addDepInfo)protectedGridDistributedBaseMessage(GridCacheVersion ver, int cnt, boolean addDepInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddDeploymentInfo()Deployment enabled flag indicates whether deployment info has to be added to this message.Collection<GridCacheVersion>committedVersions()voidcompletedVersions(Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers)booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.Collection<GridCacheVersion>rolledbackVersions()StringtoString()GridCacheVersionversion()voidversion(GridCacheVersion ver)booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheIdMessage
cacheGroupMessage, cacheId, cacheId, fieldsCount, handlerId
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, error, finishUnmarshal, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshal, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, topologyVersion, 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
-
ver
@GridToStringInclude protected GridCacheVersion ver
Lock or transaction version.
-
-
Constructor Detail
-
GridDistributedBaseMessage
protected GridDistributedBaseMessage()
Empty constructor required byExternalizable
-
GridDistributedBaseMessage
protected GridDistributedBaseMessage(int cnt, boolean addDepInfo)- Parameters:
cnt- Count of keys references in list of candidates.addDepInfo- Deployment info flag.
-
GridDistributedBaseMessage
protected GridDistributedBaseMessage(GridCacheVersion ver, int cnt, boolean addDepInfo)
- Parameters:
ver- Either lock or transaction version.cnt- Key count.addDepInfo- Deployment info flag.
-
-
Method Detail
-
addDeploymentInfo
public 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.
-
version
public GridCacheVersion version()
- Specified by:
versionin interfaceGridCacheVersionable- Returns:
- Version.
-
version
public void version(GridCacheVersion ver)
- Parameters:
ver- Version.
-
completedVersions
public void completedVersions(Collection<GridCacheVersion> committedVers, Collection<GridCacheVersion> rolledbackVers)
- Parameters:
committedVers- Committed versions.rolledbackVers- Rolled back versions.
-
committedVersions
public Collection<GridCacheVersion> committedVersions()
- Returns:
- Committed versions.
-
rolledbackVersions
public Collection<GridCacheVersion> rolledbackVersions()
- Returns:
- Rolled back versions.
-
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
-
-