|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.farrago.db.FarragoDbNullTxnMgr
public class FarragoDbNullTxnMgr
FarragoDbNullTxnMgr is a do-nothing implementation of FarragoSessionTxnMgr
. It is useful as a base class because it has a default
implementation for generating new transaction ID's and notifying listeners.
Nested Class Summary | |
---|---|
private static class |
FarragoDbNullTxnMgr.LongTxnId
|
Field Summary | |
---|---|
private List<FarragoSessionTxnListener> |
listeners
|
private AtomicLong |
nextId
|
Constructor Summary | |
---|---|
FarragoDbNullTxnMgr()
|
Method Summary | |
---|---|
protected void |
accessTable(FarragoSessionTxnId txnId,
List<String> localTableName,
TableAccessMap.Mode accessType)
Called by accessTables for each table accessed. |
private void |
accessTablePrivate(FarragoSessionTxnId txnId,
List<String> localTableName,
TableAccessMap.Mode accessType)
|
void |
accessTables(FarragoSessionTxnId txnId,
TableAccessMap accessMap)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final AtomicLong nextId
private final List<FarragoSessionTxnListener> listeners
Constructor Detail |
---|
public FarragoDbNullTxnMgr()
Method Detail |
---|
public void addListener(FarragoSessionTxnListener listener)
FarragoSessionTxnMgr
addListener
in interface FarragoSessionTxnMgr
listener
- new listenerpublic void removeListener(FarragoSessionTxnListener listener)
FarragoSessionTxnMgr
removeListener
in interface FarragoSessionTxnMgr
listener
- listener to removepublic FarragoSessionTxnId beginTxn(FarragoSession session)
FarragoSessionTxnMgr
beginTxn
in interface FarragoSessionTxnMgr
session
- session initiating the transaction
public void accessTables(FarragoSessionTxnId txnId, TableAccessMap accessMap)
FarragoSessionTxnMgr
accessTables
in interface FarragoSessionTxnMgr
txnId
- ID of accessing transactionaccessMap
- information about planned table accessesprivate void accessTablePrivate(FarragoSessionTxnId txnId, List<String> localTableName, TableAccessMap.Mode accessType)
protected void accessTable(FarragoSessionTxnId txnId, List<String> localTableName, TableAccessMap.Mode accessType)
txnId
- ID of accessing transactionlocalTableName
- qualified name of table as it is known in the local
catalogaccessType
- type of table accesspublic void endTxn(FarragoSessionTxnId txnId, FarragoSessionTxnEnd endType)
FarragoSessionTxnMgr
endTxn
in interface FarragoSessionTxnMgr
txnId
- ID of ending transactionendType
- how transaction is ending
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |