com.lucidera.farrago
Class LucidDbTxnMgr

java.lang.Object
  extended by net.sf.farrago.db.FarragoDbNullTxnMgr
      extended by com.lucidera.farrago.LucidDbTxnMgr
All Implemented Interfaces:
FarragoSessionTxnMgr

 class LucidDbTxnMgr
extends FarragoDbNullTxnMgr

LucidDbTxnMgr implements the FarragoSessionTxnMgr interface with locking semantics customized for LucidDB.

Version:
$Id: //open/dev/farrago/src/com/lucidera/farrago/LucidDbTxnMgr.java#8 $
Author:
John V. Sichi

Field Summary
private  org.apache.commons.transaction.locking.LockManager2 lockMgr
           
private static Logger tracer
           
 
Constructor Summary
LucidDbTxnMgr()
           
 
Method Summary
protected  void accessTable(FarragoSessionTxnId txnId, List<String> localTableName, TableAccessMap.Mode accessType)
          Called by accessTables for each table accessed.
private  void acquireLock(FarragoSessionTxnId txnId, Object resourceId, String renderedName, int lockLevel)
           
 FarragoSessionTxnId beginTxn(FarragoSession session)
          Begins a new transaction.
 void endTxn(FarragoSessionTxnId txnId, FarragoSessionTxnEnd endType)
          Notifies transaction manager that a transaction is ending.
 
Methods inherited from class net.sf.farrago.db.FarragoDbNullTxnMgr
accessTables, addListener, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tracer

private static final Logger tracer

lockMgr

private final org.apache.commons.transaction.locking.LockManager2 lockMgr
Constructor Detail

LucidDbTxnMgr

LucidDbTxnMgr()
Method Detail

beginTxn

public FarragoSessionTxnId beginTxn(FarragoSession session)
Description copied from interface: FarragoSessionTxnMgr
Begins a new transaction.

Specified by:
beginTxn in interface FarragoSessionTxnMgr
Overrides:
beginTxn in class FarragoDbNullTxnMgr
Parameters:
session - session initiating the transaction
Returns:
transaction ID

accessTable

protected void accessTable(FarragoSessionTxnId txnId,
                           List<String> localTableName,
                           TableAccessMap.Mode accessType)
Description copied from class: FarragoDbNullTxnMgr
Called by accessTables for each table accessed. Default implementation is to do nothing; subclasses override this to take real actions such as calling a lock manager.

Overrides:
accessTable in class FarragoDbNullTxnMgr
Parameters:
txnId - ID of accessing transaction
localTableName - qualified name of table as it is known in the local catalog
accessType - type of table access

endTxn

public void endTxn(FarragoSessionTxnId txnId,
                   FarragoSessionTxnEnd endType)
Description copied from interface: FarragoSessionTxnMgr
Notifies transaction manager that a transaction is ending.

Specified by:
endTxn in interface FarragoSessionTxnMgr
Overrides:
endTxn in class FarragoDbNullTxnMgr
Parameters:
txnId - ID of ending transaction
endType - how transaction is ending

acquireLock

private void acquireLock(FarragoSessionTxnId txnId,
                         Object resourceId,
                         String renderedName,
                         int lockLevel)