public abstract class AbstractCacheTransaction extends Object implements CacheTransaction
| Modifier and Type | Field and Description |
|---|---|
protected Set<Object> |
affectedKeys |
protected Set<Object> |
backupKeyLocks |
protected Set<Object> |
lockedKeys |
protected HashMap<Object,CacheEntry> |
lookedUpEntries |
protected List<WriteCommand> |
modifications |
protected boolean |
prepared |
protected GlobalTransaction |
tx |
| Constructor and Description |
|---|
AbstractCacheTransaction(GlobalTransaction tx,
int viewId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAffectedKey(Object key) |
void |
addAllAffectedKeys(Collection<Object> keys) |
void |
addBackupLockForKey(Object key) |
void |
addReadKey(Object key) |
void |
clearLockedKeys() |
void |
clearLookedUpEntries() |
Set<Object> |
getAffectedKeys() |
GlobalTransaction |
getGlobalTransaction()
Returns the transaction identifier.
|
Set<Object> |
getLockedKeys() |
Map<Object,CacheEntry> |
getLookedUpEntries() |
List<WriteCommand> |
getModifications()
Returns the modifications visible within the current transaction.
|
EntryVersionsMap |
getUpdatedEntryVersions() |
int |
getViewId() |
boolean |
keyRead(Object key) |
CacheEntry |
lookupEntry(Object key) |
void |
notifyOnTransactionFinished() |
boolean |
ownsLock(Object key) |
void |
registerLockedKey(Object key) |
void |
removeLookedUpEntry(Object key) |
void |
setModifications(WriteCommand[] modifications) |
void |
setUpdatedEntryVersions(EntryVersionsMap updatedEntryVersions) |
boolean |
waitForLockRelease(Object key,
long lockAcquisitionTimeout) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputLookedUpEntries, putLookedUpEntryprotected final GlobalTransaction tx
protected List<WriteCommand> modifications
protected HashMap<Object,CacheEntry> lookedUpEntries
protected volatile boolean prepared
public AbstractCacheTransaction(GlobalTransaction tx, int viewId)
public GlobalTransaction getGlobalTransaction()
CacheTransactiongetGlobalTransaction in interface CacheTransactionpublic List<WriteCommand> getModifications()
CacheTransactiongetModifications in interface CacheTransactionpublic void setModifications(WriteCommand[] modifications)
public Map<Object,CacheEntry> getLookedUpEntries()
getLookedUpEntries in interface CacheTransactionpublic CacheEntry lookupEntry(Object key)
lookupEntry in interface CacheTransactionpublic void removeLookedUpEntry(Object key)
removeLookedUpEntry in interface CacheTransactionpublic void clearLookedUpEntries()
clearLookedUpEntries in interface CacheTransactionpublic boolean ownsLock(Object key)
ownsLock in interface CacheTransactionpublic void notifyOnTransactionFinished()
notifyOnTransactionFinished in interface CacheTransactionAbstractTxLockingInterceptor.lockKeyAndCheckOwnership(org.infinispan.context.InvocationContext, Object)public boolean waitForLockRelease(Object key, long lockAcquisitionTimeout) throws InterruptedException
waitForLockRelease in interface CacheTransactionInterruptedExceptionAbstractTxLockingInterceptor.lockKeyAndCheckOwnership(org.infinispan.context.InvocationContext, Object)public int getViewId()
getViewId in interface CacheTransactionpublic void addBackupLockForKey(Object key)
addBackupLockForKey in interface CacheTransactionpublic void registerLockedKey(Object key)
public Set<Object> getLockedKeys()
getLockedKeys in interface CacheTransactionpublic void clearLockedKeys()
clearLockedKeys in interface CacheTransactionpublic void addAffectedKey(Object key)
public void addAllAffectedKeys(Collection<Object> keys)
public EntryVersionsMap getUpdatedEntryVersions()
getUpdatedEntryVersions in interface CacheTransactionpublic void setUpdatedEntryVersions(EntryVersionsMap updatedEntryVersions)
setUpdatedEntryVersions in interface CacheTransactionpublic void addReadKey(Object key)
addReadKey in interface CacheTransactionpublic boolean keyRead(Object key)
keyRead in interface CacheTransactionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.