|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheTransaction
Defines the state a infinispan transaction should have.
Method Summary | |
---|---|
void |
addBackupLockForKey(Object key)
|
void |
addReadKey(Object key)
|
void |
clearLockedKeys()
|
void |
clearLookedUpEntries()
|
List<WriteCommand> |
getAllModifications()
Returns all the modifications visible within the current transaction, including those using Flag#CACHE_MODE_LOCAL. |
Set<Object> |
getBackupLockedKeys()
|
GlobalTransaction |
getGlobalTransaction()
Returns the transaction identifier. |
Set<Object> |
getLockedKeys()
|
Map<Object,CacheEntry> |
getLookedUpEntries()
|
EntryVersion |
getLookedUpRemoteVersion(Object key)
|
List<WriteCommand> |
getModifications()
Returns the modifications visible within the current transaction. |
int |
getTopologyId()
|
EntryVersionsMap |
getUpdatedEntryVersions()
|
boolean |
hasModification(Class<?> modificationClass)
Checks if a modification of the given class (or subclass) is present in this transaction. |
boolean |
isMarkedForRollback()
|
boolean |
keyRead(Object key)
|
CacheEntry |
lookupEntry(Object key)
|
void |
markForRollback(boolean markForRollback)
|
void |
notifyOnTransactionFinished()
|
boolean |
ownsLock(Object key)
|
void |
putLookedUpEntries(Map<Object,CacheEntry> entries)
|
void |
putLookedUpEntry(Object key,
CacheEntry e)
|
void |
putLookedUpRemoteVersion(Object key,
EntryVersion version)
|
void |
removeLookedUpEntry(Object key)
|
void |
setUpdatedEntryVersions(EntryVersionsMap updatedEntryVersions)
|
boolean |
waitForLockRelease(Object key,
long lockAcquisitionTimeout)
Checks if this transaction holds a lock on the given key and then waits until the transaction completes or until the timeout expires and returns true if the transaction is complete or false otherwise. |
Method Detail |
---|
GlobalTransaction getGlobalTransaction()
List<WriteCommand> getModifications()
List<WriteCommand> getAllModifications()
boolean hasModification(Class<?> modificationClass)
modificationClass
- the modification type to look for
CacheEntry lookupEntry(Object key)
Map<Object,CacheEntry> getLookedUpEntries()
void putLookedUpEntry(Object key, CacheEntry e)
void putLookedUpEntries(Map<Object,CacheEntry> entries)
void removeLookedUpEntry(Object key)
void clearLookedUpEntries()
boolean ownsLock(Object key)
void clearLockedKeys()
Set<Object> getLockedKeys()
int getTopologyId()
Set<Object> getBackupLockedKeys()
void addBackupLockForKey(Object key)
void notifyOnTransactionFinished()
org.infinispan.interceptors.locking.AbstractTxLockingInterceptor#lockKeyAndCheckOwnership(org.infinispan.context.InvocationContext, Object)
boolean waitForLockRelease(Object key, long lockAcquisitionTimeout) throws InterruptedException
true
if the transaction is complete or false
otherwise.
If the key is not locked or if the transaction is already completed it returns true
immediately.
This method is subject to spurious returns in a way similar to Object.wait()
. It can sometimes return
before the specified time has elapsed and without guaranteeing that this transaction is complete. The caller is
responsible to call the method again if transaction completion was not reached and the time budget was not spent.
InterruptedException
org.infinispan.interceptors.locking.AbstractTxLockingInterceptor#lockKeyAndCheckOwnership(org.infinispan.context.InvocationContext, Object)
EntryVersionsMap getUpdatedEntryVersions()
void setUpdatedEntryVersions(EntryVersionsMap updatedEntryVersions)
void putLookedUpRemoteVersion(Object key, EntryVersion version)
EntryVersion getLookedUpRemoteVersion(Object key)
boolean keyRead(Object key)
void addReadKey(Object key)
boolean isMarkedForRollback()
void markForRollback(boolean markForRollback)
|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |