Class IgniteTxKey
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey
-
- All Implemented Interfaces:
Serializable,Message
public class IgniteTxKey extends Object implements Message
Cache transaction key. This wrapper is needed because same keys may be enlisted in the same transaction for multiple caches.- 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 IgniteTxKey()Empty constructor required forExternalizable.IgniteTxKey(KeyCacheObject key, int cacheId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcacheId()shortdirectType()Gets message type.booleanequals(Object o)bytefieldsCount()Gets fields count.voidfinishUnmarshal(GridCacheContext ctx, ClassLoader ldr)inthashCode()KeyCacheObjectkey()voidonAckReceived()Method called when ack message received.voidprepareMarshal(GridCacheContext ctx)booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.StringtoString()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.
-
-
-
Constructor Detail
-
IgniteTxKey
public IgniteTxKey()
Empty constructor required forExternalizable.
-
IgniteTxKey
public IgniteTxKey(KeyCacheObject key, int cacheId)
- Parameters:
key- User key.cacheId- Cache ID.
-
-
Method Detail
-
key
public KeyCacheObject key()
- Returns:
- User key.
-
cacheId
public int cacheId()
- Returns:
- Cache ID.
-
prepareMarshal
public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException
- Parameters:
ctx- Context.- Throws:
IgniteCheckedException- If failed.
-
finishUnmarshal
public void finishUnmarshal(GridCacheContext ctx, ClassLoader ldr) throws IgniteCheckedException
- 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.
-
-