org.infinispan.transaction.xa
Interface CacheTransaction

All Known Subinterfaces:
RecoveryAwareTransaction
All Known Implementing Classes:
AbstractCacheTransaction, LocalTransaction, LocalXaTransaction, RecoveryAwareLocalTransaction, RecoveryAwareRemoteTransaction, RemoteTransaction, SyncLocalTransaction

public interface CacheTransaction

Defines the state a infinispan transaction should have.

Since:
4.0
Author:
Mircea.Markus@jboss.com

Method Summary
 void addBackupLockForKey(Object key)
           
 void addReadKey(Object key)
           
 void clearLockedKeys()
           
 void clearLookedUpEntries()
           
 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 putLookedUpEntries(Map<Object,CacheEntry> entries)
           
 void putLookedUpEntry(Object key, CacheEntry e)
           
 void removeLookedUpEntry(Object key)
           
 void setUpdatedEntryVersions(EntryVersionsMap updatedEntryVersions)
           
 boolean waitForLockRelease(Object key, long lockAcquisitionTimeout)
           
 

Method Detail

getGlobalTransaction

GlobalTransaction getGlobalTransaction()
Returns the transaction identifier.


getModifications

List<WriteCommand> getModifications()
Returns the modifications visible within the current transaction.


lookupEntry

CacheEntry lookupEntry(Object key)

getLookedUpEntries

Map<Object,CacheEntry> getLookedUpEntries()

putLookedUpEntry

void putLookedUpEntry(Object key,
                      CacheEntry e)

putLookedUpEntries

void putLookedUpEntries(Map<Object,CacheEntry> entries)

removeLookedUpEntry

void removeLookedUpEntry(Object key)

clearLookedUpEntries

void clearLookedUpEntries()

ownsLock

boolean ownsLock(Object key)

clearLockedKeys

void clearLockedKeys()

getLockedKeys

Set<Object> getLockedKeys()

getViewId

int getViewId()

addBackupLockForKey

void addBackupLockForKey(Object key)

notifyOnTransactionFinished

void notifyOnTransactionFinished()
See Also:
AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(org.infinispan.context.InvocationContext, Object)

waitForLockRelease

boolean waitForLockRelease(Object key,
                           long lockAcquisitionTimeout)
                           throws InterruptedException
Throws:
InterruptedException
See Also:
AbstractTxLockingInterceptor.lockKeyAndCheckOwnership(org.infinispan.context.InvocationContext, Object)

getUpdatedEntryVersions

EntryVersionsMap getUpdatedEntryVersions()

setUpdatedEntryVersions

void setUpdatedEntryVersions(EntryVersionsMap updatedEntryVersions)

keyRead

boolean keyRead(Object key)

addReadKey

void addReadKey(Object key)

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.