Class GridDhtPartitionSupplyMessage
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheGroupIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage
-
- All Implemented Interfaces:
Serializable,GridCacheDeployable,Message
- Direct Known Subclasses:
GridDhtPartitionSupplyMessageV2
public class GridDhtPartitionSupplyMessage extends GridCacheGroupIdMessage implements GridCacheDeployable
Partition supply message.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheGroupIdMessage
grpId
-
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 GridDhtPartitionSupplyMessage()Empty constructor required forExternalizable.
-
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.voidaddEstimatedKeysCount(long cnt)voidaddKeysForCache(int cacheId, long cnt)shortdirectType()Gets message type.longestimatedKeysCount()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.booleanignoreClassErrors()longkeysForCache(int cacheId)booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.intsize()AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheGroupIdMessage
cacheGroupMessage, groupId, handlerId
-
Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheMessage
appendFlag, classError, deployInfo, error, finishUnmarshalCacheObjects, finishUnmarshalCacheObjects, lastAffinityChangedTopologyVersion, lastAffinityChangedTopologyVersion, lookupIndex, marshalCollection, marshalInfo, marshalInfos, marshalInvokeArguments, marshalTx, messageId, messageLogger, 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
-
-
-
-
Constructor Detail
-
GridDhtPartitionSupplyMessage
public GridDhtPartitionSupplyMessage()
Empty constructor required forExternalizable.
-
-
Method Detail
-
ignoreClassErrors
public boolean ignoreClassErrors()
- Overrides:
ignoreClassErrorsin classGridCacheMessage- Returns:
Trueif class loading errors should be ignored, false otherwise.
-
topologyVersion
public AffinityTopologyVersion topologyVersion()
Description copied from class:GridCacheMessageGets topology version or -1 in case of topology version is not required for this message.- Overrides:
topologyVersionin classGridCacheMessage- Returns:
- Topology version for which demand message is sent.
-
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.
-
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.
-
size
public int size()
- Returns:
- Number of entries in message.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeToin interfaceMessage- Overrides:
writeToin classGridCacheGroupIdMessage- 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 classGridCacheGroupIdMessage- Parameters:
buf- Byte buffer.reader- Reader.- Returns:
- Whether message was fully read.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheGroupIdMessage- Returns:
- Fields count.
-
estimatedKeysCount
public long estimatedKeysCount()
- Returns:
- Estimated keys count.
-
addEstimatedKeysCount
public void addEstimatedKeysCount(long cnt)
- Parameters:
cnt- Keys count to add.
-
keysForCache
public long keysForCache(int cacheId)
- Returns:
- Estimated keys count for a given cache ID.
-
addKeysForCache
public void addKeysForCache(int cacheId, long cnt)- Parameters:
cacheId- Cache ID.cnt- Keys count.
-
toString
public String toString()
- Overrides:
toStringin classGridCacheGroupIdMessage
-
-