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

## Class GridCachePlainVersionedEntry<K,V>

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

All Implemented Interfaces:
  GridCacheVersionable, GridCacheVersionedEntry<K,V>, GridCacheVersionedEntryEx<K,V>

Direct Known Subclasses:
  GridCacheLazyPlainVersionedEntry

    public class GridCachePlainVersionedEntry<K,V>
    extends Object
    implements GridCacheVersionedEntryEx<K,V>

Plain versioned entry.

### Field Summary

Fields
`protected K` `key` Key.
`protected V` `val` Value.

### Constructor Summary

Constructors
Constructor and Description
`GridCachePlainVersionedEntry(K key, V val, long ttl, long expireTime, GridCacheVersion ver)`
`GridCachePlainVersionedEntry(K key, V val, long ttl, long expireTime, GridCacheVersion ver, boolean isStartVer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte` `dataCenterId()` Gets ID of initiator data center.
`long` `expireTime()` Gets entry's expire time.
`boolean` `isStartVersion()`
`K` `key()` Gets entry's key.
`long` `order()` Gets entry's order in initiator data center.
`int` `topologyVersion()` Gets entry's topology version in initiator data center.
`String` `toString()`
`long` `ttl()` Gets entry's TTL.
`V` `value(CacheObjectValueContext ctx)` Gets entry's value.
`GridCacheVersion` `version()`

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

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

### Field Detail

#### key

    @GridToStringInclude
    protected K key

Key.

#### val

    @GridToStringInclude
    protected V val

Value.

### Constructor Detail

#### GridCachePlainVersionedEntry

    public GridCachePlainVersionedEntry(K key,
                                        @Nullable
                                        V val,
                                        long ttl,
                                        long expireTime,
                                        GridCacheVersion ver)

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

#### GridCachePlainVersionedEntry

    public GridCachePlainVersionedEntry(K key,
                                        V val,
                                        long ttl,
                                        long expireTime,
                                        GridCacheVersion ver,
                                        boolean isStartVer)

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

### Method Detail

#### key

    public K key()

Gets entry's key.

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

#### 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.

#### 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.

#### isStartVersion

    public boolean isStartVersion()

Specified by:
  `isStartVersion` in interface `GridCacheVersionedEntryEx<K,V>`
Returns:
  `True` if entry is new.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023