org.apache.ignite.internal.processors.cache.transactions

## 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 and Description
`TxEntryValueHolder()`

### Method Summary

All Methods Instance Methods Concrete Methods
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`boolean` `hasReadValue()`
`boolean` `hasValue()`
`boolean` `hasWriteValue()`
`void` `marshal(GridCacheContext<?,?> ctx)`
`void` `onAckReceived()` Method called when ack message received.
`GridCacheOperation` `op()` Gets cache operation.
`void` `op(GridCacheOperation op)` Sets cache operation.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`String` `toString()`
`void` `unmarshal(GridCacheContext<?,?> ctx, ClassLoader ldr)`
`CacheObject` `value()` Gets stored value.
`void` `value(CacheObject val)`
`void` `value(GridCacheOperation op, CacheObject val, boolean hasWriteVal, boolean hasReadVal)`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### TxEntryValueHolder

    public TxEntryValueHolder()

### 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:
  `True` if has read or write value.

#### value

    public CacheObject value()

Gets stored value.

Returns:
  Value.

#### value

    public void value(@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:
  `True` if write value was set.

#### hasReadValue

    public boolean hasReadValue()

Returns:
  `True` if 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(GridCacheContext<?,?> 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:
  `onAckReceived` in interface `Message`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                           MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
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:
  `readFrom` in interface `Message`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Returns:
  Message type.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

Specified by:
  `fieldsCount` in interface `Message`
Returns:
  Fields count.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018