IReliableDictionary2<TKey,TValue> Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a reliable collection of key/value pairs that are persisted and replicated.
public interface IReliableDictionary2<TKey,TValue> : Microsoft.ServiceFabric.Data.Collections.IReliableCollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>, Microsoft.ServiceFabric.Data.Collections.IReliableDictionary<TKey,TValue> where TKey : IComparable<TKey>, IEquatable<TKey>
type IReliableDictionary2<'Key, 'Value (requires 'Key :> IComparable<'Key> and 'Key :> IEquatable<'Key>)> = interface
interface IReliableDictionary<'Key, 'Value (requires 'Key :> IComparable<'Key> and 'Key :> IEquatable<'Key>)>
interface IReliableCollection<KeyValuePair<'Key, 'Value>>
interface IReliableState
Public Interface IReliableDictionary2(Of TKey, TValue)
Implements IReliableCollection(Of KeyValuePair(Of TKey, TValue)), IReliableDictionary(Of TKey, TValue)
Type Parameters
- TKey
The type of the keys in the reliable dictionary.
- TValue
The type of the values in the reliable dictionary.
- Derived
- Implements
Remarks
Keys or values stored in this dictionary MUST NOT be mutated outside the context of an operation on the dictionary. It is highly recommended to make both TKey
and TValue
immutable in order to avoid accidental data corruption.
The transaction is the unit of concurrency. Users can have multiple transactions in-flight at any given point of time, but for a given transaction each API must be called one at a time. When calling any asynchronous Reliable Collection method that takes an ITransaction, you must wait for completion of the returned Task before calling another method using the same transaction.
Properties
Count |
Gets the number of key-value pairs contained in the IReliableDictionary2<TKey,TValue>. |
Name |
Gets a value indicating the unique name for the IReliableState instance. (Inherited from IReliableState) |
RebuildNotificationAsyncCallback |
A function that is called when the Reliable Dictionary is being rebuilt during copy, restore or recovery. (Inherited from IReliableDictionary<TKey,TValue>) |
Methods
AddAsync(ITransaction, TKey, TValue, TimeSpan, CancellationToken) |
Adds the specified key/value pair to the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
AddAsync(ITransaction, TKey, TValue) |
Adds the specified key/value pair to the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
AddOrUpdateAsync(ITransaction, TKey, Func<TKey,TValue>, Func<TKey,TValue,TValue>, TimeSpan, CancellationToken) |
Uses the specified functions to add a key/value pair to the Reliable Dictionary if the key does not already exist, or to update a key/value pair in the Reliable Dictionary if the key already exists. (Inherited from IReliableDictionary<TKey,TValue>) |
AddOrUpdateAsync(ITransaction, TKey, Func<TKey,TValue>, Func<TKey,TValue,TValue>) |
Uses the specified functions to add a key/value pair to the Reliable Dictionary if the key does not already exist, or to update a key/value pair in the Reliable Dictionary if the key already exists. (Inherited from IReliableDictionary<TKey,TValue>) |
AddOrUpdateAsync(ITransaction, TKey, TValue, Func<TKey,TValue,TValue>, TimeSpan, CancellationToken) |
Adds a key/value pair to the Reliable Dictionary if the key does not already exist, or updates a key/value pair in the Reliable Dictionary by using the specified function if the key already exists. (Inherited from IReliableDictionary<TKey,TValue>) |
AddOrUpdateAsync(ITransaction, TKey, TValue, Func<TKey,TValue,TValue>) |
Adds a key/value pair to the Reliable Dictionary if the key does not already exist, or updates a key/value pair in the Reliable Dictionary by using the specified function if the key already exists. (Inherited from IReliableDictionary<TKey,TValue>) |
ClearAsync() |
Removes all state from the IReliableCollection<T>, including replicated and persisted state. (Inherited from IReliableCollection<T>) |
ClearAsync(TimeSpan, CancellationToken) |
Removes all keys and values from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
ContainsKeyAsync(ITransaction, TKey, LockMode, TimeSpan, CancellationToken) |
Determines whether the Reliable Dictionary contains the specified key. (Inherited from IReliableDictionary<TKey,TValue>) |
ContainsKeyAsync(ITransaction, TKey, LockMode) |
Determines whether the Reliable Dictionary contains the specified key. (Inherited from IReliableDictionary<TKey,TValue>) |
ContainsKeyAsync(ITransaction, TKey, TimeSpan, CancellationToken) |
Determines whether the Reliable Dictionary contains the specified key. (Inherited from IReliableDictionary<TKey,TValue>) |
ContainsKeyAsync(ITransaction, TKey) |
Determines whether the Reliable Dictionary contains the specified key. (Inherited from IReliableDictionary<TKey,TValue>) |
CreateEnumerableAsync(ITransaction, EnumerationMode) |
Creates an asynchronous enumerator over the IReliableDictionary<TKey,TValue>. (Inherited from IReliableDictionary<TKey,TValue>) |
CreateEnumerableAsync(ITransaction, Func<TKey,Boolean>, EnumerationMode) |
Creates an asynchronous enumerator over the IReliableDictionary<TKey,TValue>. (Inherited from IReliableDictionary<TKey,TValue>) |
CreateEnumerableAsync(ITransaction) |
Creates an asynchronous enumerator over the IReliableDictionary<TKey,TValue>. (Inherited from IReliableDictionary<TKey,TValue>) |
CreateKeyEnumerableAsync(ITransaction, EnumerationMode, TimeSpan, CancellationToken) |
Creates an async enumerator over the IReliableDictionary2<TKey,TValue> to enumerate the keys. |
CreateKeyEnumerableAsync(ITransaction, EnumerationMode) |
Creates an async enumerator over the IReliableDictionary2<TKey,TValue> to enumerate the keys. |
CreateKeyEnumerableAsync(ITransaction) |
Creates an async enumerator over the IReliableDictionary2<TKey,TValue> to enumerate the keys. |
GetCountAsync(ITransaction) |
Gets the number of elements contained in the IReliableCollection<T>. (Inherited from IReliableCollection<T>) |
GetOrAddAsync(ITransaction, TKey, Func<TKey,TValue>, TimeSpan, CancellationToken) |
Adds a key/value pair to the Reliable Dictionary by using the specified function, if the key does not already exist. (Inherited from IReliableDictionary<TKey,TValue>) |
GetOrAddAsync(ITransaction, TKey, Func<TKey,TValue>) |
Adds a key/value pair to the Reliable Dictionary by using the specified function, if the key does not already exist. (Inherited from IReliableDictionary<TKey,TValue>) |
GetOrAddAsync(ITransaction, TKey, TValue, TimeSpan, CancellationToken) |
Adds a key/value pair to the Reliable Dictionary if the key does not already exist. (Inherited from IReliableDictionary<TKey,TValue>) |
GetOrAddAsync(ITransaction, TKey, TValue) |
Adds a key/value pair to the Reliable Dictionary if the key does not already exist. If the key exists no updates will be made to the value. (Inherited from IReliableDictionary<TKey,TValue>) |
SetAsync(ITransaction, TKey, TValue, TimeSpan, CancellationToken) |
Adds a key/value pair to the Reliable Dictionary if the key does not already exist, or updates a key/value pair in the Reliable Dictionary if the key already exists. (Inherited from IReliableDictionary<TKey,TValue>) |
SetAsync(ITransaction, TKey, TValue) |
Adds a key/value pair to the Reliable Dictionary if the key does not already exist, or updates a key/value pair in the Reliable Dictionary if the key already exists. (Inherited from IReliableDictionary<TKey,TValue>) |
TryAddAsync(ITransaction, TKey, TValue, TimeSpan, CancellationToken) |
Attempts to add the specified key and value to the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryAddAsync(ITransaction, TKey, TValue) |
Attempts to add the specified key and value to the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryGetValueAsync(ITransaction, TKey, LockMode, TimeSpan, CancellationToken) |
Attempts to get the value associated with the specified key from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryGetValueAsync(ITransaction, TKey, LockMode) |
Attempts to get the value associated with the specified key from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryGetValueAsync(ITransaction, TKey, TimeSpan, CancellationToken) |
Attempts to get the value associated with the specified key from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryGetValueAsync(ITransaction, TKey) |
Attempts to get the value associated with the specified key from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryRemoveAsync(ITransaction, TKey, TimeSpan, CancellationToken) |
Attempts to remove the value with the specified key from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryRemoveAsync(ITransaction, TKey) |
Attempts to remove the value with the specified key from the Reliable Dictionary. (Inherited from IReliableDictionary<TKey,TValue>) |
TryUpdateAsync(ITransaction, TKey, TValue, TValue, TimeSpan, CancellationToken) |
Compares the existing value for the specified key with a specified value, and if they are equal, updates the key with a third value. (Inherited from IReliableDictionary<TKey,TValue>) |
TryUpdateAsync(ITransaction, TKey, TValue, TValue) |
Compares the existing value for the specified key with a specified value, and if they are equal, updates the key with a third value. (Inherited from IReliableDictionary<TKey,TValue>) |
Events
DictionaryChanged |
Occurs when the Reliable Dictionary changes. For example, addition, update or removal of an item. (Inherited from IReliableDictionary<TKey,TValue>) |
Applies to
Azure SDK for .NET