Show / Hide Table of Contents

Interface ITransactedKeyValueTable<TKey, TValue>

A key value table that operates in the scope of a transaction. For example, if the transaction has snapshot isolation, this acts on a snapshot of the table. Note that the implementation of this data structure is not required to be thread safe. Concurrent reads and/or writes may corrupt the invariants of the implementation.

Namespace: Reaqtor.QueryEngine
Assembly: Reaqtor.QueryEngine.Interfaces.dll
Syntax
public interface ITransactedKeyValueTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Type Parameters
Name Description
TKey

The type of the key.

TValue

The type of the value.

Properties

Item[TKey]

Gets the value for the given key transactionally.

Declaration
TValue this[TKey key] { get; }
Parameters
Type Name Description
TKey key

The key whose value is to be got.

Property Value
Type Description
TValue

The value for the key.

Methods

Add(TKey, TValue)

Add an item into a key value store transactionally.

Declaration
void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key

The key to insert.

TValue value

The value associated with the key.

Contains(TKey)

Queries the table transactionally to determine whether a key exists.

Declaration
bool Contains(TKey key)
Parameters
Type Name Description
TKey key

The key for which to query.

Returns
Type Description
System.Boolean

True if the key is found; false if it is not.

Remove(TKey)

Removes a key-value pair transactionally.

Declaration
void Remove(TKey key)
Parameters
Type Name Description
TKey key

The key to remove.

Update(TKey, TValue)

Updates the value for the given key transactionally.

Declaration
void Update(TKey key, TValue value)
Parameters
Type Name Description
TKey key

The key to update.

TValue value

The updated value.

Extension Methods

TransactedKeyValueTable.TryGet<TKey, TValue>(ITransactedKeyValueTable<TKey, TValue>, TKey, out TValue)
TransactedKeyValueTable.TryRemove<TKey, TValue>(ITransactedKeyValueTable<TKey, TValue>, TKey)
TransactedKeyValueTable.Clear<TKey, TValue>(ITransactedKeyValueTable<TKey, TValue>)
In This Article
Back to top Generated by DocFX