Class BasicTransactionLog<TKey, TValue>
Inheritance
BasicTransactionLog<TKey, TValue>
Assembly: ZoneTree.dll
Syntax
public sealed class BasicTransactionLog<TKey, TValue> : ITransactionLog<TKey, TValue>, IDisposable
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Constructors
|
Improve this Doc
View Source
BasicTransactionLog(ZoneTreeOptions<TKey, TValue>)
Declaration
public BasicTransactionLog(ZoneTreeOptions<TKey, TValue> options)
Parameters
Properties
|
Improve this Doc
View Source
CompactionThreshold
The total amount of transactions to be kept in memory.
Declaration
public int CompactionThreshold { get; set; }
Property Value
|
Improve this Doc
View Source
TransactionCount
Transaction count in the memory.
Declaration
public int TransactionCount { get; }
Property Value
|
Improve this Doc
View Source
TransactionIds
Return all transaction ids that are available in memory.
Declaration
public IReadOnlyList<long> TransactionIds { get; }
Property Value
|
Improve this Doc
View Source
UncommittedTransactionIds
Returns all uncommitted transaction ids.
Declaration
public IReadOnlyList<long> UncommittedTransactionIds { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddDependency(long, long)
Declaration
public void AddDependency(long src, long dest)
Parameters
Type |
Name |
Description |
long |
src |
|
long |
dest |
|
|
Improve this Doc
View Source
AddHistoryRecord(long, TKey, CombinedValue<TValue, long>)
Declaration
public void AddHistoryRecord(long transactionId, TKey key, CombinedValue<TValue, long> combinedValue)
Parameters
|
Improve this Doc
View Source
AddOrUpdateReadWriteStamp(in TKey, in ReadWriteStamp)
Declaration
public bool AddOrUpdateReadWriteStamp(in TKey key, in ReadWriteStamp readWriteStamp)
Parameters
Returns
|
Improve this Doc
View Source
CompactTransactionLog()
Declaration
public void CompactTransactionLog()
|
Improve this Doc
View Source
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
|
Improve this Doc
View Source
GetDependencyList(long)
Declaration
public IReadOnlyList<long> GetDependencyList(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
Returns
|
Improve this Doc
View Source
GetHistory(long)
Declaration
public IDictionary<TKey, CombinedValue<TValue, long>> GetHistory(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
Returns
|
Improve this Doc
View Source
GetNextTransactionId()
Declaration
public long GetNextTransactionId()
Returns
|
Improve this Doc
View Source
Declaration
public TransactionMeta GetTransactionMeta(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
Returns
|
Improve this Doc
View Source
GetTransactionState(long)
Declaration
public TransactionState GetTransactionState(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
Returns
|
Improve this Doc
View Source
GetUncommittedTransactionIdsBefore(DateTime)
Retrieves all uncommitted transaction ids started before given date-time.
This method can be used to gather stale uncommitted transaction ids.
Declaration
public IReadOnlyList<long> GetUncommittedTransactionIdsBefore(DateTime dateTime)
Parameters
Type |
Name |
Description |
DateTime |
dateTime |
Max start time (exclusive)
|
Returns
|
Improve this Doc
View Source
TransactionAborted(long)
Declaration
public void TransactionAborted(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
|
Improve this Doc
View Source
TransactionCommitted(long)
Declaration
public void TransactionCommitted(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
|
Improve this Doc
View Source
TransactionStarted(long)
Declaration
public void TransactionStarted(long transactionId)
Parameters
Type |
Name |
Description |
long |
transactionId |
|
|
Improve this Doc
View Source
TryGetReadWriteStamp(in TKey, out ReadWriteStamp)
Declaration
public bool TryGetReadWriteStamp(in TKey key, out ReadWriteStamp readWriteStamp)
Parameters
Returns
Implements