public class IgniteTxEntry extends Object implements GridPeerDeployAware, Message
Object.equals(Object) method, as transaction entries should use referential
equality.| Modifier and Type | Field and Description |
|---|---|
static GridCacheVersion |
GET_ENTRY_INVALID_VER_AFTER_GET |
static GridCacheVersion |
GET_ENTRY_INVALID_VER_UPDATED |
static GridCacheVersion |
SER_READ_EMPTY_ENTRY_VER
Dummy version for non-existing entry read in SERIALIZABLE transaction.
|
static GridCacheVersion |
SER_READ_NOT_EMPTY_VER
Dummy version for any existing entry read in SERIALIZABLE transaction.
|
IgniteInternalTx |
tx
Owning transaction.
|
DIRECT_TYPE_SIZE| Constructor and Description |
|---|
IgniteTxEntry()
Required by
Externalizable |
IgniteTxEntry(GridCacheContext<?,?> ctx,
IgniteInternalTx tx,
GridCacheOperation op,
CacheObject val,
javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor,
Object[] invokeArgs,
long ttl,
GridCacheEntryEx entry,
CacheEntryPredicate[] filters,
GridCacheVersion conflictVer,
boolean skipStore,
boolean keepBinary,
boolean addReader)
This constructor is meant for local transactions.
|
IgniteTxEntry(GridCacheContext<?,?> ctx,
IgniteInternalTx tx,
GridCacheOperation op,
CacheObject val,
long ttl,
long conflictExpireTime,
GridCacheEntryEx entry,
@Nullable GridCacheVersion conflictVer,
boolean skipStore,
boolean keepBinary)
This constructor is meant for remote transactions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntryProcessor(javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor,
Object[] invokeArgs) |
boolean |
addReader() |
void |
addReader(boolean addReader) |
CacheObject |
applyEntryProcessors(CacheObject cacheVal) |
GridCacheEntryEx |
cached() |
void |
cached(GridCacheEntryEx entry) |
int |
cacheId() |
ClassLoader |
classLoader()
Gets class loader for the class.
|
IgniteTxEntry |
cleanCopy(GridCacheContext<?,?> ctx) |
void |
clearEntryReadVersion()
Clears recorded read version, should be done before starting commit of not serializable/optimistic transaction.
|
long |
conflictExpireTime() |
void |
conflictExpireTime(long conflictExpireTime) |
@Nullable GridCacheVersion |
conflictVersion() |
void |
conflictVersion(@Nullable GridCacheVersion conflictVer) |
GridCacheContext<?,?> |
context() |
void |
context(GridCacheContext<?,?> ctx) |
GridAbsClosureX |
cqNotifyClosure() |
void |
cqNotifyClosure(GridAbsClosureX clo) |
Class<?> |
deployClass()
Gets top level user class being deployed.
|
GridCacheVersion |
dhtVersion() |
void |
dhtVersion(GridCacheVersion dhtVer) |
short |
directType()
Gets message type.
|
T2<GridCacheOperation,CacheObject> |
entryProcessorCalculatedValue() |
void |
entryProcessorCalculatedValue(T2<GridCacheOperation,CacheObject> entryProcessorCalcVal) |
Collection<T2<javax.cache.processor.EntryProcessor<Object,Object,Object>,Object[]>> |
entryProcessors() |
void |
entryProcessors(@Nullable Collection<T2<javax.cache.processor.EntryProcessor<Object,Object,Object>,Object[]>> entryProcessorsCol) |
@Nullable GridCacheVersion |
entryReadVersion()
Gets stored entry version.
|
void |
entryReadVersion(GridCacheVersion ver) |
@Nullable javax.cache.expiry.ExpiryPolicy |
expiry() |
void |
expiry(@Nullable javax.cache.expiry.ExpiryPolicy expiryPlc) |
GridCacheVersion |
explicitVersion() |
void |
explicitVersion(GridCacheVersion explicitVer) |
byte |
fieldsCount()
Gets fields count.
|
CacheEntryPredicate[] |
filters() |
void |
filters(CacheEntryPredicate[] filters) |
boolean |
filtersPassed() |
void |
filtersPassed(boolean filtersPassed) |
boolean |
filtersSet() |
void |
filtersSet(boolean filtersSet) |
boolean |
hasOldValue() |
boolean |
hasPreviousValue() |
boolean |
hasReadValue() |
boolean |
hasValue() |
boolean |
hasWriteValue() |
boolean |
isRead() |
boolean |
keepBinary() |
void |
keepBinary(boolean keepBinary)
Sets keep binary flag value.
|
KeyCacheObject |
key() |
boolean |
locallyMapped() |
void |
locallyMapped(boolean locMapped) |
boolean |
locked() |
void |
markLocked()
Marks tx entry as locked.
|
void |
markValid()
Marks this entry as value-has-bean-read.
|
void |
marshal(GridCacheSharedContext<?,?> ctx,
boolean transferExpiry) |
UUID |
nodeId() |
void |
nodeId(UUID nodeId) |
@Nullable CacheObject |
oldValue() |
void |
oldValue(CacheObject oldVal) |
void |
oldValueOnPrimary(boolean oldValOnPrimary) |
void |
onAckReceived()
Method called when ack message received.
|
GridCacheOperation |
op() |
void |
op(GridCacheOperation op) |
@Nullable GridCacheOperation |
previousOperation() |
@Nullable CacheObject |
previousValue() |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
void |
readValue(@Nullable CacheObject val)
Sets read value if this tx entry does not have write value yet.
|
void |
setAndMarkValid(CacheObject val) |
boolean |
skipStore() |
void |
skipStore(boolean skipStore)
Sets skip store flag value.
|
String |
toString() |
long |
ttl() |
void |
ttl(long ttl) |
IgniteTxKey |
txKey() |
void |
unmarshal(GridCacheSharedContext<?,?> ctx,
boolean near,
ClassLoader clsLdr)
Unmarshalls entry.
|
long |
updateCounter() |
void |
updateCounter(long partCntr)
Sets partition counter.
|
@Nullable CacheObject |
value() |
void |
value(@Nullable CacheObject val,
boolean writeVal,
boolean readVal) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public static final GridCacheVersion SER_READ_EMPTY_ENTRY_VER
public static final GridCacheVersion SER_READ_NOT_EMPTY_VER
public static final GridCacheVersion GET_ENTRY_INVALID_VER_UPDATED
public static final GridCacheVersion GET_ENTRY_INVALID_VER_AFTER_GET
@GridToStringExclude public IgniteInternalTx tx
public IgniteTxEntry()
Externalizablepublic IgniteTxEntry(GridCacheContext<?,?> ctx, IgniteInternalTx tx, GridCacheOperation op, CacheObject val, long ttl, long conflictExpireTime, GridCacheEntryEx entry, @Nullable @Nullable GridCacheVersion conflictVer, boolean skipStore, boolean keepBinary)
ctx - Cache registry.tx - Owning transaction.op - Operation.val - Value.ttl - Time to live.conflictExpireTime - DR expire time.entry - Cache entry.conflictVer - Data center replication version.skipStore - Skip store flag.public IgniteTxEntry(GridCacheContext<?,?> ctx, IgniteInternalTx tx, GridCacheOperation op, CacheObject val, javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor, Object[] invokeArgs, long ttl, GridCacheEntryEx entry, CacheEntryPredicate[] filters, GridCacheVersion conflictVer, boolean skipStore, boolean keepBinary, boolean addReader)
ctx - Cache registry.tx - Owning transaction.op - Operation.val - Value.entryProcessor - Entry processor.invokeArgs - Optional arguments for EntryProcessor.ttl - Time to live.entry - Cache entry.filters - Put filters.conflictVer - Data center replication version.skipStore - Skip store flag.addReader - Add reader flag.public GridCacheContext<?,?> context()
public void context(GridCacheContext<?,?> ctx)
ctx - Cache context for this tx entry.public boolean locallyMapped()
public void locallyMapped(boolean locMapped)
locMapped - Flag indicating if this entry is affinity mapped to the same node.public IgniteTxEntry cleanCopy(GridCacheContext<?,?> ctx)
ctx - Context.public UUID nodeId()
public void nodeId(UUID nodeId)
nodeId - Node ID.public GridCacheVersion dhtVersion()
public void dhtVersion(GridCacheVersion dhtVer)
dhtVer - DHT version.public boolean locked()
True if tx entry was marked as locked.public void markLocked()
public void updateCounter(long partCntr)
partCntr - Partition counter.public long updateCounter()
public void setAndMarkValid(CacheObject val)
val - Value to set.public void markValid()
public KeyCacheObject key()
public int cacheId()
public void skipStore(boolean skipStore)
skipStore - Skip store flag.public boolean skipStore()
public void oldValueOnPrimary(boolean oldValOnPrimary)
oldValOnPrimary - True If old value for was non null on primary node.public void keepBinary(boolean keepBinary)
keepBinary - Keep binary flag value.public boolean keepBinary()
public void addReader(boolean addReader)
addReader - Add reader flag.public boolean addReader()
public IgniteTxKey txKey()
public GridCacheEntryEx cached()
public void cached(GridCacheEntryEx entry)
entry - Cache entry.@Nullable public @Nullable CacheObject value()
@Nullable public @Nullable CacheObject oldValue()
public void oldValue(CacheObject oldVal)
oldVal - Old value.public boolean hasOldValue()
True if old value present.public boolean hasValue()
True if has value explicitly set.public boolean hasWriteValue()
True if has write value set.public boolean hasReadValue()
True if has read value set.@Nullable public @Nullable CacheObject previousValue()
public boolean hasPreviousValue()
True if has previous value explicitly set.@Nullable public @Nullable GridCacheOperation previousOperation()
public long ttl()
public void ttl(long ttl)
ttl - Time to live.public long conflictExpireTime()
public void conflictExpireTime(long conflictExpireTime)
conflictExpireTime - Conflict expire time.public void value(@Nullable
@Nullable CacheObject val,
boolean writeVal,
boolean readVal)
val - Entry value.writeVal - Write value flag.readVal - Read value flag.public void readValue(@Nullable
@Nullable CacheObject val)
val - Read value to set.public void addEntryProcessor(javax.cache.processor.EntryProcessor<Object,Object,Object> entryProcessor, Object[] invokeArgs)
entryProcessor - Entry processor.invokeArgs - Optional arguments for EntryProcessor.public Collection<T2<javax.cache.processor.EntryProcessor<Object,Object,Object>,Object[]>> entryProcessors()
public CacheObject applyEntryProcessors(CacheObject cacheVal)
cacheVal - Value.public void entryProcessors(@Nullable
@Nullable Collection<T2<javax.cache.processor.EntryProcessor<Object,Object,Object>,Object[]>> entryProcessorsCol)
entryProcessorsCol - Collection of entry processors.public GridCacheOperation op()
public void op(GridCacheOperation op)
op - Cache operation.public boolean isRead()
True if read entry.public void explicitVersion(GridCacheVersion explicitVer)
explicitVer - Explicit version.public GridCacheVersion explicitVersion()
@Nullable public @Nullable GridCacheVersion conflictVersion()
public void conflictVersion(@Nullable
@Nullable GridCacheVersion conflictVer)
conflictVer - Conflict version.public CacheEntryPredicate[] filters()
public void filters(CacheEntryPredicate[] filters)
filters - Put filters.public boolean filtersPassed()
True if filters passed for fast-commit transactions.public void filtersPassed(boolean filtersPassed)
filtersPassed - True if filters passed for fast-commit transactions.public boolean filtersSet()
True if filters are set.public void filtersSet(boolean filtersSet)
filtersSet - True if filters are set and should not be replaced.public void marshal(GridCacheSharedContext<?,?> ctx, boolean transferExpiry) throws IgniteCheckedException
ctx - Context.transferExpiry - True if expire policy should be marshalled.IgniteCheckedException - If failed.public void unmarshal(GridCacheSharedContext<?,?> ctx, boolean near, ClassLoader clsLdr) throws IgniteCheckedException
ctx - Cache context.near - Near flag.clsLdr - Class loader.IgniteCheckedException - If un-marshalling failed.public void expiry(@Nullable
@Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)
expiryPlc - Expiry policy.@Nullable public @Nullable javax.cache.expiry.ExpiryPolicy expiry()
public T2<GridCacheOperation,CacheObject> entryProcessorCalculatedValue()
public void entryProcessorCalculatedValue(T2<GridCacheOperation,CacheObject> entryProcessorCalcVal)
entryProcessorCalcVal - Entry processor calculated value.@Nullable public @Nullable GridCacheVersion entryReadVersion()
IgniteCache.getEntry(Object) method.public void entryReadVersion(GridCacheVersion ver)
ver - Entry version.public void clearEntryReadVersion()
public void onAckReceived()
onAckReceived in interface Messagepublic boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public short directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Messagepublic Class<?> deployClass()
deployClass in interface GridPeerDeployAwarepublic GridAbsClosureX cqNotifyClosure()
public void cqNotifyClosure(GridAbsClosureX clo)
clo - Clo.public ClassLoader classLoader()
GridPeerDeployAware.deployClass() as well as all of its
dependencies.
Note that in most cases the class loader returned from this method
and the class loader for the class returned from GridPeerDeployAware.deployClass() method
will be the same. If they are not the same, it is required that the class loader
returned from this method still has to be able to load the deploy class and all its
dependencies.
classLoader in interface GridPeerDeployAware
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020