Class DataEntry
- java.lang.Object
-
- org.apache.ignite.internal.pagemem.wal.record.DataEntry
-
- Direct Known Subclasses:
LazyDataEntry,RecordDataV1Serializer.EncryptedDataEntry,UnwrapDataEntry
public class DataEntry extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected intcacheIdCache ID.static byteEMPTY_FLAGSEmpty flags.protected longexpireTimeExpire time.protected byteflagsBit flags.static byteFROM_STORE_FLAGprotected KeyCacheObjectkeyCache object key.protected GridCacheVersionnearXidVerNear transaction version.protected GridCacheOperationopEntry operation performed.protected longpartCntprotected intpartIdPartition ID.static bytePRELOAD_FLAGstatic bytePRIMARY_FLAGprotected @Nullable CacheObjectvalCache object value.protected GridCacheVersionwriteVerWrite version.
-
Constructor Summary
Constructors Constructor Description DataEntry(int cacheId, KeyCacheObject key, @Nullable CacheObject val, GridCacheOperation op, GridCacheVersion nearXidVer, GridCacheVersion writeVer, long expireTime, int partId, long partCnt, byte flags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcacheId()longexpireTime()byteflags()Entry flags.static byteflags(boolean primary)static byteflags(boolean primary, boolean preload, boolean fromStore)KeyCacheObjectkey()GridCacheVersionnearXidVersion()GridCacheOperationop()longpartitionCounter()DataEntrypartitionCounter(long partCnt)Sets partition update counter to entry.intpartitionId()StringtoString()CacheObjectvalue()GridCacheVersionwriteVersion()
-
-
-
Field Detail
-
EMPTY_FLAGS
public static final byte EMPTY_FLAGS
Empty flags.- See Also:
- Constant Field Values
-
PRIMARY_FLAG
public static final byte PRIMARY_FLAG
- See Also:
- Constant Field Values
-
PRELOAD_FLAG
public static final byte PRELOAD_FLAG
- See Also:
- Constant Field Values
-
FROM_STORE_FLAG
public static final byte FROM_STORE_FLAG
- See Also:
- Constant Field Values
-
cacheId
@GridToStringInclude protected int cacheId
Cache ID.
-
key
protected KeyCacheObject key
Cache object key.
-
val
@Nullable protected @Nullable CacheObject val
Cache object value. May be null forGridCacheOperation.DELETE
-
op
@GridToStringInclude protected GridCacheOperation op
Entry operation performed.
-
nearXidVer
@GridToStringInclude protected GridCacheVersion nearXidVer
Near transaction version.
-
writeVer
@GridToStringInclude protected GridCacheVersion writeVer
Write version.
-
expireTime
protected long expireTime
Expire time.
-
partId
@GridToStringInclude protected int partId
Partition ID.
-
partCnt
@GridToStringInclude protected long partCnt
-
flags
@GridToStringInclude protected byte flags
Bit flags.- 0 bit - primary - seted when current node is primary for entry partition.
- 1 bit - preload - seted when entry logged during preload(rebalance).
- 2 bit - fromStore - seted when entry loaded from third-party store.
-
-
Constructor Detail
-
DataEntry
public DataEntry(int cacheId, KeyCacheObject key, @Nullable @Nullable CacheObject val, GridCacheOperation op, GridCacheVersion nearXidVer, GridCacheVersion writeVer, long expireTime, int partId, long partCnt, byte flags)- Parameters:
cacheId- Cache ID.key- Key.val- Value or null for delete operation.op- Operation.nearXidVer- Near transaction version.writeVer- Write version.expireTime- Expire time.partId- Partition ID.partCnt- Partition counter.flags- Entry flags.
-
-
Method Detail
-
flags
public static byte flags(boolean primary)
- Parameters:
primary-Trueif node is primary for partition in the moment of logging.- Returns:
- Flags value.
-
flags
public static byte flags(boolean primary, boolean preload, boolean fromStore)- Parameters:
primary-Trueif node is primary for partition in the moment of logging.preload-Trueif logged during preload(rebalance).fromStore-Trueif logged during loading from third-party store.- Returns:
- Flags value.
-
cacheId
public int cacheId()
- Returns:
- Cache ID.
-
key
public KeyCacheObject key()
- Returns:
- Key cache object.
-
value
public CacheObject value()
- Returns:
- Value cache object.
-
op
public GridCacheOperation op()
- Returns:
- Cache operation.
-
nearXidVersion
public GridCacheVersion nearXidVersion()
- Returns:
- Near transaction version if the write was transactional.
-
writeVersion
public GridCacheVersion writeVersion()
- Returns:
- Write version.
-
partitionId
public int partitionId()
- Returns:
- Partition ID.
-
partitionCounter
public long partitionCounter()
- Returns:
- Partition counter.
-
partitionCounter
public DataEntry partitionCounter(long partCnt)
Sets partition update counter to entry.- Parameters:
partCnt- Partition update counter.- Returns:
thisfor chaining.
-
expireTime
public long expireTime()
- Returns:
- Expire time.
-
flags
public byte flags()
Entry flags.- See Also:
flags
-
-