Class IncrementalSnapshotAwareMessage
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.persistence.snapshot.IncrementalSnapshotAwareMessage
-
- All Implemented Interfaces:
Serializable,Message
public class IncrementalSnapshotAwareMessage extends GridCacheMessage
Message that holds a transaction message and incremental snapshot ID.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static shortTYPE_CODE-
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 Constructor Description IncrementalSnapshotAwareMessage()IncrementalSnapshotAwareMessage(GridCacheMessage payload, UUID id, @Nullable UUID txSnpId, long topVer)
-
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.booleancacheGroupMessage()shortdirectType()Gets message type.bytefieldsCount()Gets fields count.voidfinishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr)This method is called after the message is deserialized and is responsible for unmarshalling state marshalled inGridCacheMessage.prepareMarshal(GridCacheSharedContext)method.inthandlerId()UUIDid()GridCacheMessagepayload()voidprepareMarshal(GridCacheSharedContext ctx)This method is called before the whole message is serialized and is responsible for pre-marshalling state.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.longsnapshotTopologyVersion()UUIDtxInrementalSnapshotId()ID of the latest incremental snapshot after which this transaction committed.booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, ignoreClassErrors, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, nextIndexId, onAckReceived, onClassError, partition, partitionExchangeMessage, prepare, prepareMarshalCacheObject, prepareMarshalCacheObjects, prepareMarshalCacheObjects, prepareObject, prepareObject, topologyVersion, toString, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
-
-
-
-
Field Detail
-
TYPE_CODE
public static final short TYPE_CODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IncrementalSnapshotAwareMessage
public IncrementalSnapshotAwareMessage()
-
IncrementalSnapshotAwareMessage
public IncrementalSnapshotAwareMessage(GridCacheMessage payload, UUID id, @Nullable @Nullable UUID txSnpId, long topVer)
-
-
Method Detail
-
id
public UUID id()
- Returns:
- Incremental snapshot ID.
-
txInrementalSnapshotId
public UUID txInrementalSnapshotId()
ID of the latest incremental snapshot after which this transaction committed.
-
payload
public GridCacheMessage payload()
-
snapshotTopologyVersion
public long snapshotTopologyVersion()
- Returns:
- Incremental snapshot topology version.
-
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:
prepareMarshalin classGridCacheMessage- 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 inGridCacheMessage.prepareMarshal(GridCacheSharedContext)method.- Overrides:
finishUnmarshalin classGridCacheMessage- Parameters:
ctx- Context.ldr- Class loader.- Throws:
IgniteCheckedException- If failed.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridCacheMessage- 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 classGridCacheMessage- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
directType
public short directType()
Gets message type.- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheMessage- Returns:
- Fields count.
-
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.
-
handlerId
public int handlerId()
- Specified by:
handlerIdin classGridCacheMessage- Returns:
- ID to distinguish message handlers for the same messages but for different caches/cache groups.
-
cacheGroupMessage
public boolean cacheGroupMessage()
- Specified by:
cacheGroupMessagein classGridCacheMessage- Returns:
Trueif cache group message.
-
-