org.infinispan.transaction.xa
Class AbstractCacheTransaction
java.lang.Object
org.infinispan.transaction.xa.AbstractCacheTransaction
- All Implemented Interfaces:
- CacheTransaction
- Direct Known Subclasses:
- LocalTransaction, RemoteTransaction
public abstract class AbstractCacheTransaction
- extends Object
- implements CacheTransaction
Base class for local and remote transaction.
Impl note: The aggregated modification list and lookedUpEntries are not instantiated here but in subclasses.
This is done in order to take advantage of the fact that, for remote transactions we already know the size of the
modifications list at creation time.
- Since:
- 4.2
- Author:
- Mircea.Markus@jboss.com, Galder ZamarreƱo
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modifications
protected List<WriteCommand> modifications
lookedUpEntries
protected BidirectionalLinkedHashMap<Object,CacheEntry> lookedUpEntries
tx
protected GlobalTransaction tx
affectedKeys
protected Set<Object> affectedKeys
AbstractCacheTransaction
public AbstractCacheTransaction()
getGlobalTransaction
public GlobalTransaction getGlobalTransaction()
- Description copied from interface:
CacheTransaction
- Returns the transaction identifier.
- Specified by:
getGlobalTransaction in interface CacheTransaction
getModifications
public List<WriteCommand> getModifications()
- Description copied from interface:
CacheTransaction
- Returns the modifications visible within the current transaction.
- Specified by:
getModifications in interface CacheTransaction
setModifications
public void setModifications(WriteCommand[] modifications)
getLookedUpEntries
public BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
- Specified by:
getLookedUpEntries in interface CacheTransaction
lookupEntry
public CacheEntry lookupEntry(Object key)
- Specified by:
lookupEntry in interface CacheTransaction
removeLookedUpEntry
public void removeLookedUpEntry(Object key)
- Specified by:
removeLookedUpEntry in interface CacheTransaction
clearLookedUpEntries
public void clearLookedUpEntries()
- Specified by:
clearLookedUpEntries in interface CacheTransaction
getAffectedKeys
public Set<Object> getAffectedKeys()
setAffectedKeys
public void setAffectedKeys(Set<Object> affectedKeys)
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.