org.hsqldb
Class TransactionManagerMV2PL
- java.lang.Object
-
- org.hsqldb.TransactionManagerMV2PL
-
- All Implemented Interfaces:
- TransactionManager
public class TransactionManagerMV2PL extends java.lang.Object implements TransactionManager
Manages rows involved in transactions- Since:
- 2.0.0
-
-
Field Summary
Fields Modifier and Type Field and Description LongKeyHashMaprowActionMapMap : rowID -> RowAction-
Fields inherited from interface org.hsqldb.TransactionManager
ACTION_DUP, ACTION_READ, ACTION_REF, LOCKS, MVCC, MVLOCKS
-
-
Constructor Summary
Constructors Constructor and Description TransactionManagerMV2PL(Database db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description RowActionaddDeleteAction(Session session, Table table, PersistentStore store, Row row, int[] colMap)voidaddInsertAction(Session session, Table table, PersistentStore store, Row row, int[] changedColumns)voidaddTransactionInfo(CachedObject object)store transaction info for a new row.voidbeginAction(Session session, Statement cs)add session to the end of queue when a transaction starts (depending on isolation mode)voidbeginActionResume(Session session)add session to the end of queue when a transaction starts (depending on isolation mode)voidbeginTransaction(Session session)booleancanRead(Session session, PersistentStore store, long id, int mode)booleancanRead(Session session, PersistentStore store, Row row, int mode, int[] colMap)booleancommitTransaction(Session session)voidcompleteActions(Session session)longgetGlobalChangeTimestamp()longgetNextGlobalChangeTimestamp()gets the next timestamp for an actionintgetTransactionControl()booleanisMVCC()booleanisMVRows()booleanprepareCommitActions(Session session)voidremoveTransactionInfo(CachedObject object)remove the transaction infovoidremoveTransactionInfo(long id)voidrollback(Session session)voidrollbackAction(Session session)voidrollbackPartial(Session session, int start, long timestamp)rollback the row actions from start index in list and the given timestampvoidrollbackSavepoint(Session session, int index)voidsetTransactionControl(Session session, int mode)voidsetTransactionInfo(PersistentStore store, CachedObject object)add transaction info to a row just loaded from the cache.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hsqldb.TransactionManager
getNextGlobalChangeTimestamp
-
-
-
-
Field Detail
-
rowActionMap
public LongKeyHashMap rowActionMap
Map : rowID -> RowAction
-
-
Constructor Detail
-
TransactionManagerMV2PL
public TransactionManagerMV2PL(Database db)
-
-
Method Detail
-
getGlobalChangeTimestamp
public long getGlobalChangeTimestamp()
- Specified by:
getGlobalChangeTimestampin interfaceTransactionManager
-
isMVRows
public boolean isMVRows()
- Specified by:
isMVRowsin interfaceTransactionManager
-
isMVCC
public boolean isMVCC()
- Specified by:
isMVCCin interfaceTransactionManager
-
getTransactionControl
public int getTransactionControl()
- Specified by:
getTransactionControlin interfaceTransactionManager
-
setTransactionControl
public void setTransactionControl(Session session, int mode)
- Specified by:
setTransactionControlin interfaceTransactionManager
-
completeActions
public void completeActions(Session session)
- Specified by:
completeActionsin interfaceTransactionManager
-
prepareCommitActions
public boolean prepareCommitActions(Session session)
- Specified by:
prepareCommitActionsin interfaceTransactionManager
-
commitTransaction
public boolean commitTransaction(Session session)
- Specified by:
commitTransactionin interfaceTransactionManager
-
rollback
public void rollback(Session session)
- Specified by:
rollbackin interfaceTransactionManager
-
rollbackSavepoint
public void rollbackSavepoint(Session session, int index)
- Specified by:
rollbackSavepointin interfaceTransactionManager
-
rollbackAction
public void rollbackAction(Session session)
- Specified by:
rollbackActionin interfaceTransactionManager
-
rollbackPartial
public void rollbackPartial(Session session, int start, long timestamp)
rollback the row actions from start index in list and the given timestamp- Specified by:
rollbackPartialin interfaceTransactionManager
-
addDeleteAction
public RowAction addDeleteAction(Session session, Table table, PersistentStore store, Row row, int[] colMap)
- Specified by:
addDeleteActionin interfaceTransactionManager
-
addInsertAction
public void addInsertAction(Session session, Table table, PersistentStore store, Row row, int[] changedColumns)
- Specified by:
addInsertActionin interfaceTransactionManager
-
canRead
public boolean canRead(Session session, PersistentStore store, Row row, int mode, int[] colMap)
- Specified by:
canReadin interfaceTransactionManager
-
canRead
public boolean canRead(Session session, PersistentStore store, long id, int mode)
- Specified by:
canReadin interfaceTransactionManager
-
addTransactionInfo
public void addTransactionInfo(CachedObject object)
Description copied from interface:TransactionManagerstore transaction info for a new row. called only for CACHED tables- Specified by:
addTransactionInfoin interfaceTransactionManager
-
setTransactionInfo
public void setTransactionInfo(PersistentStore store, CachedObject object)
add transaction info to a row just loaded from the cache. called only for CACHED tables- Specified by:
setTransactionInfoin interfaceTransactionManager
-
removeTransactionInfo
public void removeTransactionInfo(CachedObject object)
remove the transaction info- Specified by:
removeTransactionInfoin interfaceTransactionManager
-
removeTransactionInfo
public void removeTransactionInfo(long id)
- Specified by:
removeTransactionInfoin interfaceTransactionManager
-
beginTransaction
public void beginTransaction(Session session)
- Specified by:
beginTransactionin interfaceTransactionManager
-
beginAction
public void beginAction(Session session, Statement cs)
add session to the end of queue when a transaction starts (depending on isolation mode)- Specified by:
beginActionin interfaceTransactionManager
-
beginActionResume
public void beginActionResume(Session session)
add session to the end of queue when a transaction starts (depending on isolation mode)- Specified by:
beginActionResumein interfaceTransactionManager
-
getNextGlobalChangeTimestamp
public long getNextGlobalChangeTimestamp()
gets the next timestamp for an action
-
-
DataMelt 3.0 © DataMelt by jWork.ORG