Documentation ¶
Index ¶
- type LockBasedTxMgr
- func (txmgr *LockBasedTxMgr) Commit() error
- func (txmgr *LockBasedTxMgr) CommitLostBlock(block *common.Block) error
- func (txmgr *LockBasedTxMgr) GetLastSavepoint() (*version.Height, error)
- func (txmgr *LockBasedTxMgr) NewQueryExecutor() (ledger.QueryExecutor, error)
- func (txmgr *LockBasedTxMgr) NewTxSimulator() (ledger.TxSimulator, error)
- func (txmgr *LockBasedTxMgr) Rollback()
- func (txmgr *LockBasedTxMgr) ShouldRecover(lastAvailableBlock uint64) (bool, uint64, error)
- func (txmgr *LockBasedTxMgr) Shutdown()
- func (txmgr *LockBasedTxMgr) ValidateAndPrepare(block *common.Block, doMVCCValidation bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockBasedTxMgr ¶
type LockBasedTxMgr struct {
// contains filtered or unexported fields
}
LockBasedTxMgr a simple implementation of interface `txmgmt.TxMgr`. This implementation uses a read-write lock to prevent conflicts between transaction simulation and committing
func NewLockBasedTxMgr ¶
func NewLockBasedTxMgr(db statedb.VersionedDB) *LockBasedTxMgr
NewLockBasedTxMgr constructs a new instance of NewLockBasedTxMgr
func (*LockBasedTxMgr) Commit ¶
func (txmgr *LockBasedTxMgr) Commit() error
Commit implements method in interface `txmgmt.TxMgr`
func (*LockBasedTxMgr) CommitLostBlock ¶
func (txmgr *LockBasedTxMgr) CommitLostBlock(block *common.Block) error
CommitLostBlock implements method in interface kvledger.Recoverer
func (*LockBasedTxMgr) GetLastSavepoint ¶
func (txmgr *LockBasedTxMgr) GetLastSavepoint() (*version.Height, error)
GetLastSavepoint returns the block num recorded in savepoint, returns 0 if NO savepoint is found
func (*LockBasedTxMgr) NewQueryExecutor ¶
func (txmgr *LockBasedTxMgr) NewQueryExecutor() (ledger.QueryExecutor, error)
NewQueryExecutor implements method in interface `txmgmt.TxMgr`
func (*LockBasedTxMgr) NewTxSimulator ¶
func (txmgr *LockBasedTxMgr) NewTxSimulator() (ledger.TxSimulator, error)
NewTxSimulator implements method in interface `txmgmt.TxMgr`
func (*LockBasedTxMgr) Rollback ¶
func (txmgr *LockBasedTxMgr) Rollback()
Rollback implements method in interface `txmgmt.TxMgr`
func (*LockBasedTxMgr) ShouldRecover ¶
func (txmgr *LockBasedTxMgr) ShouldRecover(lastAvailableBlock uint64) (bool, uint64, error)
ShouldRecover implements method in interface kvledger.Recoverer
func (*LockBasedTxMgr) Shutdown ¶
func (txmgr *LockBasedTxMgr) Shutdown()
Shutdown implements method in interface `txmgmt.TxMgr`