public class Transaction extends Object
Constructor and Description |
---|
Transaction(TransactionMgr txMgr,
TransactionLifecycleListener concurMgr,
TransactionLifecycleListener recoveryMgr,
TransactionLifecycleListener bufferMgr,
boolean readOnly,
long txNum)
Creates a new transaction and associates it with a recovery manager, a
concurrency manager, and a buffer manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addLifecycleListener(TransactionLifecycleListener listener) |
BufferMgr |
bufferMgr() |
void |
commit()
Commits the current transaction.
|
ConcurrencyMgr |
concurrencyMgr() |
void |
endStatement()
Finishes the current statement.
|
long |
getTransactionNumber() |
boolean |
isReadOnly() |
RecoveryMgr |
recoveryMgr() |
void |
rollback()
Rolls back the current transaction.
|
public Transaction(TransactionMgr txMgr, TransactionLifecycleListener concurMgr, TransactionLifecycleListener recoveryMgr, TransactionLifecycleListener bufferMgr, boolean readOnly, long txNum)
VanillaDb
, which are
created during system initialization. Thus this constructor cannot be
called until VanillaDb.init(String)
is called first.txMgr
- the transaction managerconcurMgr
- the associated concurrency managerrecoveryMgr
- the associated recovery managerbufferMgr
- the associated buffer managerreadOnly
- is read-only modetxNum
- the number of the transactionpublic void addLifecycleListener(TransactionLifecycleListener listener)
public void commit()
public void rollback()
public void endStatement()
public long getTransactionNumber()
public boolean isReadOnly()
public RecoveryMgr recoveryMgr()
public ConcurrencyMgr concurrencyMgr()
public BufferMgr bufferMgr()
Copyright © 2022 VanillaDB Organization. All rights reserved.