Class GridCacheTtlUpdateRequest
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.GridCacheMessage
-
- org.apache.ignite.internal.processors.cache.GridCacheIdMessage
-
- org.apache.ignite.internal.processors.cache.distributed.GridCacheTtlUpdateRequest
-
- All Implemented Interfaces:
Serializable,Message
public class GridCacheTtlUpdateRequest extends GridCacheIdMessage
- See Also:
- Serialized Form
-
-
Field Summary
-
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 Constructor Description GridCacheTtlUpdateRequest()Required empty constructor.GridCacheTtlUpdateRequest(int cacheId, AffinityTopologyVersion topVer, long ttl)
-
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.voidaddEntry(KeyCacheObject key, GridCacheVersion ver)voidaddNearEntry(KeyCacheObject key, GridCacheVersion ver)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.List<KeyCacheObject>keys()List<KeyCacheObject>nearKeys()List<GridCacheVersion>nearVersions()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.AffinityTopologyVersiontopologyVersion()Gets topology version or -1 in case of topology version is not required for this message.StringtoString()longttl()GridCacheVersionversion(int idx)List<GridCacheVersion>versions()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, handlerId
-
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, transferExpiryPolicy, unmarshalCollection, unmarshalInfo, unmarshalInfos, unmarshalInvokeArguments, unmarshalTx
-
-
-
-
Constructor Detail
-
GridCacheTtlUpdateRequest
public GridCacheTtlUpdateRequest()
Required empty constructor.
-
GridCacheTtlUpdateRequest
public GridCacheTtlUpdateRequest(int cacheId, AffinityTopologyVersion topVer, long ttl)- Parameters:
cacheId- Cache ID.topVer- Topology version.ttl- TTL.
-
-
Method Detail
-
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.
-
ttl
public long ttl()
- Returns:
- TTL.
-
addEntry
public void addEntry(KeyCacheObject key, GridCacheVersion ver)
- Parameters:
key- Key.ver- Version.
-
addNearEntry
public void addNearEntry(KeyCacheObject key, GridCacheVersion ver)
- Parameters:
key- Key.ver- Version.
-
keys
public List<KeyCacheObject> keys()
- Returns:
- Keys.
-
versions
public List<GridCacheVersion> versions()
- Returns:
- Versions.
-
version
public GridCacheVersion version(int idx)
- Parameters:
idx- Entry index.- Returns:
- Version.
-
nearKeys
public List<KeyCacheObject> nearKeys()
- Returns:
- Keys for near cache.
-
nearVersions
public List<GridCacheVersion> nearVersions()
- Returns:
- Versions for near cache entries.
-
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.
-
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.
-
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.
-
directType
public short directType()
Gets message type.- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Overrides:
fieldsCountin classGridCacheIdMessage- Returns:
- Fields count.
-
toString
public String toString()
- Overrides:
toStringin classGridCacheIdMessage
-
-