net.sf.farrago.session
Interface FarragoSessionTxnMgr

All Known Implementing Classes:
FarragoDbNullTxnMgr, LucidDbTxnMgr

public interface FarragoSessionTxnMgr

FarragoSessionTxnMgr defines the interface for transaction management across sessions. It is under development and currently only addresses table access, so it is likely to change drastically. In particular, it will be refined to allow different data wrappers to use different transaction managers; once that happens, most extensions will probably use a common implementation which knows how to coordinate two-phase commits across wrapper-level managers. Until then, transaction management is up to each extension. Another major change required is coordination with Fennel's notion of transactions.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/session/FarragoSessionTxnMgr.java#8 $
Author:
John V. Sichi

Method Summary
 void accessTables(FarragoSessionTxnId txnId, TableAccessMap tableAccessMap)
          Notifies transaction manager that a collection of tables is about to be accessed.
 void addListener(FarragoSessionTxnListener listener)
          Adds a listener for transaction events.
 FarragoSessionTxnId beginTxn(FarragoSession session)
          Begins a new transaction.
 void endTxn(FarragoSessionTxnId txnId, FarragoSessionTxnEnd endType)
          Notifies transaction manager that a transaction is ending.
 void removeListener(FarragoSessionTxnListener listener)
          Removes a listener for transaction events.
 

Method Detail

addListener

void addListener(FarragoSessionTxnListener listener)
Adds a listener for transaction events.

Parameters:
listener - new listener

removeListener

void removeListener(FarragoSessionTxnListener listener)
Removes a listener for transaction events.

Parameters:
listener - listener to remove

beginTxn

FarragoSessionTxnId beginTxn(FarragoSession session)
Begins a new transaction.

Parameters:
session - session initiating the transaction
Returns:
transaction ID

accessTables

void accessTables(FarragoSessionTxnId txnId,
                  TableAccessMap tableAccessMap)
Notifies transaction manager that a collection of tables is about to be accessed.

Parameters:
txnId - ID of accessing transaction
tableAccessMap - information about planned table accesses

endTxn

void endTxn(FarragoSessionTxnId txnId,
            FarragoSessionTxnEnd endType)
Notifies transaction manager that a transaction is ending.

Parameters:
txnId - ID of ending transaction
endType - how transaction is ending