C# Class DBreeze.Transactions.TransactionUnit

This object includes class Transaction (visible for the user) and holds internally technical transaction information.
Inheritance: IDisposable
Show file Open project: hhblaze/DBreeze Class Usage Examples

Public Methods

Method Description
AddTransactionWriteTable ( string tableName, ITransactable table ) : void

Adds a table which will take place in transaction operations. Reserved has value null, Real (which are acquired by Transaction for Write) has ITransactable filled. ITransactable = null, gives to differ from toched and reserved.

AddTransactionWriteTablesAwaitingReservation ( List tablesNames ) : void

Used by TransactionCoordinator.RegisterWriteTablesForTransaction

ClearTransactionWriteTablesAwaitingReservation ( List tablesNames ) : void
Commit ( ) : void

Dispose ( ) : void
GetTransactionWriteTables ( ) : List

Doesn't need pattern check Returns all tables which took place in write operation for the current transaction Without reserved as Text tables only which have real ITransactable inside

GetTransactionWriteTablesAwaitingReservation ( ) : List
GetTransactionWriteTablesNames ( ) : List

NOT USED ANYWHERE Get ITransactable by tableName. Can return NULL, if table is not in a list of WRITE tables.

Returns only table names for reservation

If_TableIsReservedForWrite ( string tableName ) : bool

Used inside of Transaction, we can choose fot READ or READ_SYNCHRO for READ FUNCs

RollBack ( ) : void

TransactionUnit ( int transactionType, TransactionsCoordinator transactionsCoordinator, eTransactionTablesLockTypes lockType ) : System

Method Details

AddTransactionWriteTable() public method

Adds a table which will take place in transaction operations. Reserved has value null, Real (which are acquired by Transaction for Write) has ITransactable filled. ITransactable = null, gives to differ from toched and reserved.
public AddTransactionWriteTable ( string tableName, ITransactable table ) : void
tableName string
table ITransactable if null - will be added to Reservation table
return void

AddTransactionWriteTablesAwaitingReservation() public method

Used by TransactionCoordinator.RegisterWriteTablesForTransaction
public AddTransactionWriteTablesAwaitingReservation ( List tablesNames ) : void
tablesNames List
return void

ClearTransactionWriteTablesAwaitingReservation() public method

public ClearTransactionWriteTablesAwaitingReservation ( List tablesNames ) : void
tablesNames List
return void

Commit() public method

public Commit ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

GetTransactionWriteTables() public method

Doesn't need pattern check Returns all tables which took place in write operation for the current transaction Without reserved as Text tables only which have real ITransactable inside
public GetTransactionWriteTables ( ) : List
return List

GetTransactionWriteTablesAwaitingReservation() public method

public GetTransactionWriteTablesAwaitingReservation ( ) : List
return List

GetTransactionWriteTablesNames() public method

NOT USED ANYWHERE Get ITransactable by tableName. Can return NULL, if table is not in a list of WRITE tables. Returns only table names for reservation
public GetTransactionWriteTablesNames ( ) : List
return List

If_TableIsReservedForWrite() public method

Used inside of Transaction, we can choose fot READ or READ_SYNCHRO for READ FUNCs
public If_TableIsReservedForWrite ( string tableName ) : bool
tableName string
return bool

RollBack() public method

public RollBack ( ) : void
return void

TransactionUnit() public method

public TransactionUnit ( int transactionType, TransactionsCoordinator transactionsCoordinator, eTransactionTablesLockTypes lockType ) : System
transactionType int
transactionsCoordinator TransactionsCoordinator
lockType eTransactionTablesLockTypes
return System