Class CacheVersionedValue
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.distributed.near.CacheVersionedValue
-
- All Implemented Interfaces:
Serializable,Message
public class CacheVersionedValue extends Object implements Message
Cache object and version.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description CacheVersionedValue()CacheVersionedValue(CacheObject val, GridCacheVersion ver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortdirectType()Gets message type.bytefieldsCount()Gets fields count.voidfinishUnmarshal(GridCacheContext ctx, ClassLoader ldr)This method is called after the whole message is received and is responsible for unmarshalling state.voidonAckReceived()Method called when ack message received.voidprepareMarshal(CacheObjectContext ctx)This method is called before the whole message is sent and is responsible for pre-marshalling state.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.StringtoString()CacheObjectvalue()GridCacheVersionversion()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.
-
-
-
Constructor Detail
-
CacheVersionedValue
public CacheVersionedValue()
-
CacheVersionedValue
public CacheVersionedValue(CacheObject val, GridCacheVersion ver)
- Parameters:
val- Cache value.ver- Cache version.
-
-
Method Detail
-
version
public GridCacheVersion version()
- Returns:
- Cache version.
-
value
public CacheObject value()
- Returns:
- Cache object.
-
prepareMarshal
public void prepareMarshal(CacheObjectContext ctx) throws IgniteCheckedException
This method is called before the whole message is sent and is responsible for pre-marshalling state.- Parameters:
ctx- Cache object context.- Throws:
IgniteCheckedException- If failed.
-
finishUnmarshal
public void finishUnmarshal(GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
This method is called after the whole message is received and is responsible for unmarshalling state.- Parameters:
ctx- Context.ldr- Class loader.- Throws:
IgniteCheckedException- If failed.
-
onAckReceived
public void onAckReceived()
Method called when ack message received.- Specified by:
onAckReceivedin interfaceMessage
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.
-
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- Returns:
- Fields count.
-
-