public class IgniteTxEntry<K,V> extends Object implements GridPeerDeployAware, Externalizable, OptimizedMarshallable
Object.equals(Object) method, as transaction entries should use referential
equality.CLS_ID_FIELD_NAME| Constructor and Description |
|---|
IgniteTxEntry()
Required by
Externalizable |
IgniteTxEntry(GridCacheContext<K,V> ctx,
IgniteInternalTx<K,V> tx,
GridCacheOperation op,
V val,
javax.cache.processor.EntryProcessor<K,V,?> entryProcessor,
Object[] invokeArgs,
long ttl,
GridCacheEntryEx<K,V> entry,
IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filters,
GridCacheVersion drVer)
This constructor is meant for local transactions.
|
IgniteTxEntry(GridCacheContext<K,V> ctx,
IgniteInternalTx<K,V> tx,
GridCacheOperation op,
V val,
long ttl,
long drExpireTime,
GridCacheEntryEx<K,V> entry,
GridCacheVersion drVer)
This constructor is meant for remote transactions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntryProcessor(javax.cache.processor.EntryProcessor<K,V,?> entryProcessor,
Object[] invokeArgs) |
V |
applyEntryProcessors(V val) |
GridCacheEntryEx<K,V> |
cached() |
void |
cached(GridCacheEntryEx<K,V> entry,
byte[] keyBytes) |
int |
cacheId() |
ClassLoader |
classLoader()
Gets class loader for the class.
|
IgniteTxEntry<K,V> |
cleanCopy(GridCacheContext<K,V> ctx) |
GridCacheContext<K,V> |
context() |
Class<?> |
deployClass()
Gets top level user class being deployed.
|
GridCacheVersion |
dhtVersion() |
void |
dhtVersion(GridCacheVersion dhtVer) |
long |
drExpireTime() |
void |
drExpireTime(long drExpireTime) |
GridCacheVersion |
drVersion() |
void |
drVersion(GridCacheVersion drVer) |
Collection<T2<javax.cache.processor.EntryProcessor<K,V,?>,Object[]>> |
entryProcessors() |
void |
entryProcessors(Collection<T2<javax.cache.processor.EntryProcessor<K,V,?>,Object[]>> entryProcessorsCol) |
javax.cache.expiry.ExpiryPolicy |
expiry() |
void |
expiry(javax.cache.expiry.ExpiryPolicy expiryPlc) |
GridCacheVersion |
explicitVersion() |
void |
explicitVersion(GridCacheVersion explicitVer) |
IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] |
filters() |
void |
filters(IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filters) |
boolean |
filtersPassed() |
void |
filtersPassed(boolean filtersPassed) |
boolean |
filtersSet() |
void |
filtersSet(boolean filtersSet) |
Object |
ggClassId()
Implementation of this method should simply return value of
GG_CLASS_ID field. |
boolean |
groupLockEntry() |
void |
groupLockEntry(boolean grpLock) |
boolean |
hasReadValue() |
boolean |
hasValue() |
boolean |
hasWriteValue() |
boolean |
isRead() |
K |
key() |
byte[] |
keyBytes() |
void |
keyBytes(byte[] keyBytes) |
boolean |
locallyMapped() |
void |
locallyMapped(boolean locMapped) |
boolean |
locked() |
void |
markLocked()
Marks tx entry as locked.
|
void |
marshal(GridCacheSharedContext<K,V> ctx,
boolean transferExpiry) |
UUID |
nodeId() |
void |
nodeId(UUID nodeId) |
GridCacheOperation |
op() |
void |
op(GridCacheOperation op) |
GridCacheOperation |
previousOperation() |
V |
previousValue() |
void |
readExternal(ObjectInput in) |
void |
readValue(V val)
Sets read value if this tx entrty does not have write value yet.
|
String |
toString() |
long |
ttl() |
void |
ttl(long ttl) |
IgniteTxKey<K> |
txKey() |
void |
unmarshal(GridCacheSharedContext<K,V> ctx,
boolean near,
ClassLoader clsLdr)
Unmarshalls entry.
|
V |
value() |
void |
value(V val,
boolean writeVal,
boolean readVal) |
byte[] |
valueBytes() |
void |
valueBytes(byte[] valBytes) |
void |
writeExternal(ObjectOutput out) |
public IgniteTxEntry()
Externalizablepublic IgniteTxEntry(GridCacheContext<K,V> ctx, IgniteInternalTx<K,V> tx, GridCacheOperation op, V val, long ttl, long drExpireTime, GridCacheEntryEx<K,V> entry, @Nullable GridCacheVersion drVer)
ctx - Cache registry.tx - Owning transaction.op - Operation.val - Value.ttl - Time to live.drExpireTime - DR expire time.entry - Cache entry.drVer - Data center replication version.public IgniteTxEntry(GridCacheContext<K,V> ctx, IgniteInternalTx<K,V> tx, GridCacheOperation op, V val, javax.cache.processor.EntryProcessor<K,V,?> entryProcessor, Object[] invokeArgs, long ttl, GridCacheEntryEx<K,V> entry, IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filters, GridCacheVersion drVer)
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.drVer - Data center replication version.public GridCacheContext<K,V> 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<K,V> cleanCopy(GridCacheContext<K,V> 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 K key()
public int cacheId()
public IgniteTxKey<K> txKey()
@Nullable public byte[] keyBytes()
public void keyBytes(byte[] keyBytes)
keyBytes - Key bytes.public GridCacheEntryEx<K,V> cached()
public void cached(GridCacheEntryEx<K,V> entry, @Nullable byte[] keyBytes)
entry - Cache entry.keyBytes - Key bytes, possibly null.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 GridCacheOperation previousOperation()
@Nullable public byte[] valueBytes()
public void valueBytes(@Nullable byte[] valBytes)
valBytes - Value bytes.public long ttl()
public void ttl(long ttl)
ttl - Time to live.public long drExpireTime()
public void drExpireTime(long drExpireTime)
drExpireTime - DR expire time.public void value(@Nullable V val, boolean writeVal, boolean readVal)
val - Entry value.writeVal - Write value flag.readVal - Read value flag.public void readValue(@Nullable V val)
val - Read value to set.public void addEntryProcessor(javax.cache.processor.EntryProcessor<K,V,?> entryProcessor, Object[] invokeArgs)
entryProcessor - Entry processor.invokeArgs - Optional arguments for EntryProcessor.public Collection<T2<javax.cache.processor.EntryProcessor<K,V,?>,Object[]>> entryProcessors()
public V applyEntryProcessors(V val)
val - Value.public void entryProcessors(@Nullable Collection<T2<javax.cache.processor.EntryProcessor<K,V,?>,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 drVersion()
public void drVersion(@Nullable GridCacheVersion drVer)
drVer - DR version.public IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] filters()
public void filters(IgnitePredicate<javax.cache.Cache.Entry<K,V>>[] 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<K,V> ctx, boolean transferExpiry) throws IgniteCheckedException
ctx - Context.transferExpiry - True if expire policy should be marshalled.IgniteCheckedException - If failed.public void unmarshal(GridCacheSharedContext<K,V> 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 void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic Object ggClassId()
GG_CLASS_ID field.ggClassId in interface OptimizedMarshallablepublic 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-RC1 Release Date : February 17 2015