org.compass.core.transaction
Class LocalTransaction

java.lang.Object
  extended by org.compass.core.transaction.AbstractTransaction
      extended by org.compass.core.transaction.LocalTransaction
All Implemented Interfaces:
CompassTransaction, InternalCompassTransaction

public class LocalTransaction
extends AbstractTransaction

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.compass.core.CompassTransaction
CompassTransaction.TransactionIsolation
 
Field Summary
 
Fields inherited from class org.compass.core.transaction.AbstractTransaction
transactionFactory
 
Constructor Summary
LocalTransaction(InternalCompassSession session, TransactionFactory transactionFactory, CompassTransaction.TransactionIsolation transactionIsolation)
           
 
Method Summary
 void begin()
           
protected  void doCommit()
           
protected  void doRollback()
           
 CompassSession getSession()
          Returns the current Compass transaction associated with this transaction.
 void join(InternalCompassSession session)
           
 boolean wasCommitted()
          Check if this transaction was successfully committed.
 boolean wasRolledBack()
          Was this transaction rolled back or set to rollback only?
 
Methods inherited from class org.compass.core.transaction.AbstractTransaction
commit, getSearchEngine, isBegun, rollback, setBegun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTransaction

public LocalTransaction(InternalCompassSession session,
                        TransactionFactory transactionFactory,
                        CompassTransaction.TransactionIsolation transactionIsolation)
Method Detail

join

public void join(InternalCompassSession session)
          throws CompassException
Throws:
CompassException

begin

public void begin()
           throws CompassException
Throws:
CompassException

doCommit

protected void doCommit()
                 throws CompassException
Specified by:
doCommit in class AbstractTransaction
Throws:
CompassException

doRollback

protected void doRollback()
                   throws CompassException
Specified by:
doRollback in class AbstractTransaction
Throws:
CompassException

wasRolledBack

public boolean wasRolledBack()
                      throws CompassException
Description copied from interface: CompassTransaction
Was this transaction rolled back or set to rollback only?

Returns:
If the transaction was rolled backed
Throws:
CompassException

wasCommitted

public boolean wasCommitted()
                     throws CompassException
Description copied from interface: CompassTransaction
Check if this transaction was successfully committed. This method could return false even after successful invocation of commit().

Returns:
If the transaction was committed
Throws:
CompassException

getSession

public CompassSession getSession()
Description copied from interface: CompassTransaction
Returns the current Compass transaction associated with this transaction.



Copyright (c) 2004-2008 The Compass Project.