Interface ITransactionalZoneTreeMaintenance<TKey, TValue>
The interface for the maintenance of a transactional ZoneTree.
Namespace: Tenray.ZoneTree
Assembly: ZoneTree.dll
Syntax
public interface ITransactionalZoneTreeMaintenance<TKey, TValue>
Type Parameters
Name | Description |
---|---|
TKey | The key type |
TValue | The value type |
Properties
| Improve this Doc View SourceTransactionLog
Transaction Log instance.
Declaration
ITransactionLog<TKey, TValue> TransactionLog { get; }
Property Value
Type | Description |
---|---|
ITransactionLog<TKey, TValue> |
UncommittedTransactionIds
Retrieves uncommitted transaction ids.
Declaration
IReadOnlyList<long> UncommittedTransactionIds { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<long> |
ZoneTree
Underlying non-transactional ZoneTree.
Declaration
IZoneTree<TKey, TValue> ZoneTree { get; }
Property Value
Type | Description |
---|---|
IZoneTree<TKey, TValue> |
Methods
| Improve this Doc View SourceDestroyTree()
Removes the transactional tree from the universe. Destroys the tree, transaction logs, entire data and WAL store or folder.
Declaration
void DestroyTree()
RollbackAllUncommitted()
Rollbacks all uncommitted transactions.
Declaration
int RollbackAllUncommitted()
Returns
Type | Description |
---|---|
int | Count of rollbacked transactions. |
RollbackUncommittedTransactionIdsBefore(DateTime)
Rollbacks all uncommitted transaction ids started before given date-time. Transaction log memory usage increases by state uncommitted transaction ids. Those must be rollbacked.
Declaration
int RollbackUncommittedTransactionIdsBefore(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | dateTime | Max start time (exclusive) |
Returns
Type | Description |
---|---|
int | Count of rollbacked transactions. |
SaveMetaData()
Saves tree meta data and clears the meta wal record. After calling this method, the JSON meta file contains up to date tree meta data.
Saving meta file helps following:
- Reduce the size of meta wal file.
- Make Json meta file up to date to analyze parts of the LSM tree. Because Meta WAL file is not human readable.
It is up to user to decide when and how frequently save the meta file.
Declaration
void SaveMetaData()