org.infinispan.transaction.xa
Class LocalTransaction

java.lang.Object
  extended by org.infinispan.transaction.xa.AbstractCacheTransaction
      extended by org.infinispan.transaction.xa.LocalTransaction
All Implemented Interfaces:
CacheTransaction

public class LocalTransaction
extends AbstractCacheTransaction

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

Field Summary
 
Fields inherited from class org.infinispan.transaction.xa.AbstractCacheTransaction
affectedKeys, lookedUpEntries, modifications, tx
 
Constructor Summary
LocalTransaction(Transaction transaction, GlobalTransaction tx)
           
 
Method Summary
 void addModification(WriteCommand mod)
           
 boolean equals(Object o)
           
 BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
           
 Collection<Address> getRemoteLocksAcquired()
           
 Transaction getTransaction()
           
 Xid getXid()
           
 int hashCode()
           
 boolean hasRemoteLocksAcquired(List<Address> leavers)
           
 boolean isEnlisted()
          As per the JTA spec, XAResource.start is called on enlistment.
 boolean isMarkedForRollback()
           
 boolean isReadOnly()
           
 void locksAcquired(Collection<Address> nodes)
           
 void markForRollback()
           
 void putLookedUpEntry(Object key, CacheEntry e)
           
 void setXid(Xid xid)
           
 String toString()
           
 
Methods inherited from class org.infinispan.transaction.xa.AbstractCacheTransaction
clearLookedUpEntries, getAffectedKeys, getGlobalTransaction, getModifications, lookupEntry, removeLookedUpEntry, setAffectedKeys, setModifications
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalTransaction

public LocalTransaction(Transaction transaction,
                        GlobalTransaction tx)
Method Detail

addModification

public void addModification(WriteCommand mod)

hasRemoteLocksAcquired

public boolean hasRemoteLocksAcquired(List<Address> leavers)

locksAcquired

public void locksAcquired(Collection<Address> nodes)

getRemoteLocksAcquired

public Collection<Address> getRemoteLocksAcquired()

markForRollback

public void markForRollback()

isMarkedForRollback

public boolean isMarkedForRollback()

getTransaction

public Transaction getTransaction()

getLookedUpEntries

public BidirectionalMap<Object,CacheEntry> getLookedUpEntries()
Specified by:
getLookedUpEntries in interface CacheTransaction
Overrides:
getLookedUpEntries in class AbstractCacheTransaction

putLookedUpEntry

public void putLookedUpEntry(Object key,
                             CacheEntry e)

isReadOnly

public boolean isReadOnly()

setXid

public void setXid(Xid xid)

getXid

public Xid getXid()

isEnlisted

public boolean isEnlisted()
As per the JTA spec, XAResource.start is called on enlistment. That method also sets the xid for this local transaction.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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