org.apache.ignite.internal.processors.cache.version

## Class GridCacheRawVersionedEntry<K,V>

- java.lang.Object
- - org.apache.ignite.internal.processors.datastreamer.DataStreamerEntry
  - - org.apache.ignite.internal.processors.cache.version.GridCacheRawVersionedEntry<K,V>

All Implemented Interfaces:
  Externalizable, Serializable, Map.Entry<KeyCacheObject,CacheObject>, GridCacheVersionable, GridCacheVersionedEntry<K,V>, Message

    public class GridCacheRawVersionedEntry<K,V>
    extends DataStreamerEntry
    implements GridCacheVersionedEntry<K,V>, GridCacheVersionable, Externalizable

Raw versioned entry.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.datastreamer.DataStreamerEntry

`key, val`

### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheRawVersionedEntry()` `Externalizable` support.
`GridCacheRawVersionedEntry(byte[] keyBytes, byte[] valBytes, long ttl, long expireTime, GridCacheVersion ver)` Constructor used in receiver hub where marshalled key and value are available and we do not want to unmarshal value.
`GridCacheRawVersionedEntry(KeyCacheObject key, @Nullable CacheObject val, long ttl, long expireTime, GridCacheVersion ver)` Constructor used for local store load when key and value are available.

### Method Summary

All Methods Instance Methods Concrete Methods
`byte` `dataCenterId()` Gets ID of initiator data center.
`short` `directType()` Gets message type.
`long` `expireTime()` Gets entry's expire time.
`byte` `fieldsCount()` Gets fields count.
`K` `key()` Gets entry's key.
`void` `key(KeyCacheObject key)`
`byte[]` `keyBytes()`
`void` `marshal(CacheObjectContext ctx, Marshaller marsh)` Perform internal marshal of this entry before it will be serialized.
`long` `order()` Gets entry's order in initiator data center.
`void` `prepareDirectMarshal(CacheObjectContext ctx)`
`void` `readExternal(ObjectInput in)`
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`int` `topologyVersion()` Gets entry's topology version in initiator data center.
`String` `toString()`
`long` `ttl()` Gets entry's TTL.
`void` `unmarshal(CacheObjectContext ctx)`
`void` `unmarshal(CacheObjectContext ctx, Marshaller marsh)` Perform internal unmarshal of this entry.
`void` `unmarshalKey(CacheObjectContext ctx, Marshaller marsh)` Perform internal key unmarshal of this entry.
`V` `value(CacheObjectValueContext ctx)` Gets entry's value.
`byte[]` `valueBytes()`
`GridCacheVersion` `version()`
`void` `writeExternal(ObjectOutput out)`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class org.apache.ignite.internal.processors.datastreamer.DataStreamerEntry

`getKey, getValue, onAckReceived, setValue, toEntry`

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

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

### Methods inherited from interface java.util.Map.Entry

`comparingByKey, comparingByKey, comparingByValue, comparingByValue, equals, hashCode`

### Constructor Detail

#### GridCacheRawVersionedEntry

    public GridCacheRawVersionedEntry()

`Externalizable` support.

#### GridCacheRawVersionedEntry

    public GridCacheRawVersionedEntry(KeyCacheObject key,
                                      @Nullable
                                      @Nullable CacheObject val,
                                      long ttl,
                                      long expireTime,
                                      GridCacheVersion ver)

Constructor used for local store load when key and value are available.

Parameters:
  `key` - Key.
  `val` - Value.
  `expireTime` - Expire time.
  `ttl` - TTL.
  `ver` - Version.

#### GridCacheRawVersionedEntry

    public GridCacheRawVersionedEntry(byte[] keyBytes,
                                      byte[] valBytes,
                                      long ttl,
                                      long expireTime,
                                      GridCacheVersion ver)

Constructor used in receiver hub where marshalled key and value are available and we do not want to unmarshal value.

Parameters:
  `keyBytes` - Key.
  `valBytes` - Value bytes.
  `expireTime` - Expire time.
  `ttl` - TTL.
  `ver` - Version.

### Method Detail

#### key

    public K key()

Gets entry's key.

Specified by:
  `key` in interface `GridCacheVersionedEntry<K,V>`
Returns:
  Entry's key.

#### key

    public void key(KeyCacheObject key)

Parameters:
  `key` - Key.

#### keyBytes

    public byte[] keyBytes()

Returns:
  Key bytes.

#### value

    public V value(CacheObjectValueContext ctx)

Gets entry's value.

Specified by:
  `value` in interface `GridCacheVersionedEntry<K,V>`
Parameters:
  `ctx` - Object value context.
Returns:
  Entry's value.

#### valueBytes

    public byte[] valueBytes()

Returns:
  Value bytes.

#### ttl

    public long ttl()

Gets entry's TTL.

Specified by:
  `ttl` in interface `GridCacheVersionedEntry<K,V>`
Returns:
  Entry's TTL.

#### expireTime

    public long expireTime()

Gets entry's expire time.

Specified by:
  `expireTime` in interface `GridCacheVersionedEntry<K,V>`
Returns:
  Entry's expire time.

#### dataCenterId

    public byte dataCenterId()

Gets ID of initiator data center.

Specified by:
  `dataCenterId` in interface `GridCacheVersionedEntry<K,V>`
Returns:
  ID of initiator data center.

#### topologyVersion

    public int topologyVersion()

Gets entry's topology version in initiator data center.

Specified by:
  `topologyVersion` in interface `GridCacheVersionedEntry<K,V>`
Returns:
  Entry's topology version in initiator data center.

#### order

    public long order()

Gets entry's order in initiator data center.

Specified by:
  `order` in interface `GridCacheVersionedEntry<K,V>`
Returns:
  Entry's order in initiator data center

#### version

    public GridCacheVersion version()

Specified by:
  `version` in interface `GridCacheVersionable`
Returns:
  Version.

#### unmarshal

    public void unmarshal(CacheObjectContext ctx,
                          Marshaller marsh)
                   throws IgniteCheckedException

Perform internal unmarshal of this entry. It must be performed after entry is deserialized and before its restored key/value are needed.

Parameters:
  `ctx` - Context.
  `marsh` - Marshaller.
Throws:
  `IgniteCheckedException` - If failed.

#### unmarshal

    public void unmarshal(CacheObjectContext ctx)
                   throws IgniteCheckedException

Parameters:
  `ctx` - Context.
Throws:
  `IgniteCheckedException` - If failed.

#### unmarshalKey

    public void unmarshalKey(CacheObjectContext ctx,
                             Marshaller marsh)
                      throws IgniteCheckedException

Perform internal key unmarshal of this entry. It must be performed after entry is deserialized and before its restored key/value are needed.

Parameters:
  `ctx` - Context.
  `marsh` - Marshaller.
Throws:
  `IgniteCheckedException` - If failed.

#### marshal

    public void marshal(CacheObjectContext ctx,
                        Marshaller marsh)
                 throws IgniteCheckedException

Perform internal marshal of this entry before it will be serialized.

Parameters:
  `ctx` - Context.
  `marsh` - Marshaller.
Throws:
  `IgniteCheckedException` - If failed.

#### prepareDirectMarshal

    public void prepareDirectMarshal(CacheObjectContext ctx)
                              throws IgniteCheckedException

Parameters:
  `ctx` - Context.
Throws:
  `IgniteCheckedException` - If failed.

#### directType

    public short directType()

Gets message type.

Specified by:
  `directType` in interface `Message`
Overrides:
  `directType` in class `DataStreamerEntry`
Returns:
  Message type.

#### readFrom

    public boolean readFrom(ByteBuffer buf,
                            MessageReader reader)

Reads this message from provided byte buffer.

Specified by:
  `readFrom` in interface `Message`
Overrides:
  `readFrom` in class `DataStreamerEntry`
Parameters:
  `buf` - Byte buffer.
  `reader` - Reader.
Returns:
  Whether message was fully read.

#### writeTo

    public boolean writeTo(ByteBuffer buf,
                           MessageWriter writer)

Writes this message to provided byte buffer.

Specified by:
  `writeTo` in interface `Message`
Overrides:
  `writeTo` in class `DataStreamerEntry`
Parameters:
  `buf` - Byte buffer.
  `writer` - Writer.
Returns:
  Whether message was fully written.

#### fieldsCount

    public byte fieldsCount()

Gets fields count.

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

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### toString

    public String toString()

Overrides:
  `toString` in class `DataStreamerEntry`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021