Class TxEntryValueHolder
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.transactions.TxEntryValueHolder
-
- All Implemented Interfaces:
Serializable,Message
public class TxEntryValueHolder extends Object implements Message
Auxiliary class to hold value, value-has-been-set flag, value update operation, value bytes.- 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 TxEntryValueHolder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortdirectType()Gets message type.bytefieldsCount()Gets fields count.booleanhasReadValue()booleanhasValue()booleanhasWriteValue()voidmarshal(GridCacheContext<?,?> ctx)voidonAckReceived()Method called when ack message received.GridCacheOperationop()Gets cache operation.voidop(GridCacheOperation op)Sets cache operation.booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.StringtoString()voidunmarshal(CacheObjectValueContext ctx, ClassLoader ldr)CacheObjectvalue()Gets stored value.voidvalue(@Nullable CacheObject val)voidvalue(GridCacheOperation op, CacheObject val, boolean hasWriteVal, boolean hasReadVal)booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.
-
-
-
Method Detail
-
value
public void value(GridCacheOperation op, CacheObject val, boolean hasWriteVal, boolean hasReadVal)
- Parameters:
op- Cache operation.val- Value.hasWriteVal- Write value presence flag.hasReadVal- Read value presence flag.
-
hasValue
public boolean hasValue()
- Returns:
Trueif has read or write value.
-
value
public CacheObject value()
Gets stored value.- Returns:
- Value.
-
value
public void value(@Nullable @Nullable CacheObject val)- Parameters:
val- Stored value.
-
op
public GridCacheOperation op()
Gets cache operation.- Returns:
- Cache operation.
-
op
public void op(GridCacheOperation op)
Sets cache operation.- Parameters:
op- Cache operation.
-
hasWriteValue
public boolean hasWriteValue()
- Returns:
Trueif write value was set.
-
hasReadValue
public boolean hasReadValue()
- Returns:
Trueif read value was set.
-
marshal
public void marshal(GridCacheContext<?,?> ctx) throws IgniteCheckedException
- Parameters:
ctx- Cache context.- Throws:
IgniteCheckedException- If marshaling failed.
-
unmarshal
public void unmarshal(CacheObjectValueContext ctx, ClassLoader ldr) throws IgniteCheckedException
- Parameters:
ctx- Cache context.ldr- Class loader.- Throws:
IgniteCheckedException- If unmarshalling 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.
-
-