public class IgniteTxEntry extends Object implements GridPeerDeployAware, Message
Object.equals(Object) method, as transaction entries should use referential
equality.| 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)
This constructor is meant for local transactions.
|
IgniteTxEntry(GridCacheContext<?,?> ctx,
IgniteInternalTx tx,
GridCacheOperation op,
CacheObject val,
long ttl,
long conflictExpireTime,
GridCacheEntryEx entry,
GridCacheVersion conflictVer)
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) |
CacheObject |
applyEntryProcessors(CacheObject cacheVal) |
GridCacheEntryEx |
cached() |
void |
cached(GridCacheEntryEx entry) |
int |
cacheId() |
ClassLoader |
classLoader()
Gets class loader for the class.
|
IgniteTxEntry |
cleanCopy(GridCacheContext<?,?> ctx) |
long |
conflictExpireTime() |
void |
conflictExpireTime(long conflictExpireTime) |
GridCacheVersion |
conflictVersion() |
void |
conflictVersion(GridCacheVersion conflictVer) |
GridCacheContext<?,?> |
context() |
Class<?> |
deployClass()
Gets top level user class being deployed.
|
GridCacheVersion |
dhtVersion() |
void |
dhtVersion(GridCacheVersion dhtVer) |
byte |
directType()
Gets message type.
|
Collection<T2<javax.cache.processor.EntryProcessor<Object,Object,Object>,Object[]>> |
entryProcessors() |
void |
entryProcessors(Collection<T2<javax.cache.processor.EntryProcessor<Object,Object,Object>,Object[]>> entryProcessorsCol) |
javax.cache.expiry.ExpiryPolicy |
expiry() |
void |
expiry(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 |
groupLockEntry() |
void |
groupLockEntry(boolean grpLock) |
boolean |
hasReadValue() |
boolean |
hasValue() |
boolean |
hasWriteValue() |
boolean |
isRead() |
KeyCacheObject |
key() |
boolean |
locallyMapped() |
void |
locallyMapped(boolean locMapped) |
boolean |
locked() |
void |
markLocked()
Marks tx entry as locked.
|
void |
marshal(GridCacheSharedContext<?,?> ctx,
boolean transferExpiry) |
UUID |
nodeId() |
void |
nodeId(UUID nodeId) |
GridCacheOperation |
op() |
void |
op(GridCacheOperation op) |
GridCacheOperation |
previousOperation() |
CacheObject |
previousValue() |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
void |
readValue(CacheObject val)
Sets read value if this tx entry does not have write value yet.
|
String |
toString() |
long |
ttl() |
void |
ttl(long ttl) |
IgniteTxKey |
txKey() |
void |
unmarshal(GridCacheSharedContext<?,?> ctx,
boolean near,
ClassLoader clsLdr)
Unmarshalls entry.
|
CacheObject |
value() |
void |
value(CacheObject val,
boolean writeVal,
boolean readVal) |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public IgniteTxEntry()
Externalizablepublic IgniteTxEntry(GridCacheContext<?,?> ctx, IgniteInternalTx tx, GridCacheOperation op, CacheObject val, long ttl, long conflictExpireTime, GridCacheEntryEx entry, @Nullable GridCacheVersion conflictVer)
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.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)
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.public GridCacheContext<?,?> context()
public boolean locallyMapped()
public void locallyMapped(boolean locMapped)
locMapped - Flag indicating if this entry is affinity mapped to the same node.public boolean groupLockEntry()
True if this entry was added in group lock transaction and
this is not a group lock entry.public void groupLockEntry(boolean grpLock)
grpLock - True if this entry was added in group lock transaction and
this is not a group lock entry.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 KeyCacheObject key()
public int cacheId()
public IgniteTxKey txKey()
public GridCacheEntryEx cached()
public void cached(GridCacheEntryEx entry)
entry - Cache entry.@Nullable public CacheObject value()
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 CacheObject previousValue()
@Nullable public 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 CacheObject val, boolean writeVal, boolean readVal)
val - Entry value.writeVal - Write value flag.readVal - Read value flag.public void readValue(@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 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 GridCacheVersion conflictVersion()
public void conflictVersion(@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 javax.cache.expiry.ExpiryPolicy expiryPlc)
expiryPlc - Expiry policy.@Nullable public javax.cache.expiry.ExpiryPolicy expiry()
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public byte directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Messagepublic Class<?> deployClass()
deployClass in interface GridPeerDeployAwarepublic 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 Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015