-
Notifications
You must be signed in to change notification settings - Fork 10
[Feature]: Add Async/Await support in Cortex.States #158
Copy link
Copy link
Labels
enhancementNew feature or requestNew feature or requestfeatureThis label is in use for minor version incrementsThis label is in use for minor version increments
Milestone
Description
New async interface
We are introducing IAsyncDataStore for not introducing a breaking change in IDataSource
public interface IAsyncDataStore<TKey, TValue> : IDataStore<TKey, TValue>
{
ValueTask<TValue?> GetAsync(
TKey key,
CancellationToken cancellationToken = default);
ValueTask PutAsync(
TKey key,
TValue value,
CancellationToken cancellationToken = default);
ValueTask<bool> ContainsKeyAsync(
TKey key,
CancellationToken cancellationToken = default);
ValueTask RemoveAsync(
TKey key,
CancellationToken cancellationToken = default);
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_0_OR_GREATER
IAsyncEnumerable<KeyValuePair<TKey, TValue>> GetAllAsync(
CancellationToken cancellationToken = default);
IAsyncEnumerable<TKey> GetKeysAsync(
CancellationToken cancellationToken = default);
#endif
ValueTask<IDictionary<TKey, TValue>> GetManyAsync(
IEnumerable<TKey> keys,
CancellationToken cancellationToken = default);
ValueTask PutManyAsync(
IEnumerable<KeyValuePair<TKey, TValue>> items,
CancellationToken cancellationToken = default);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeatureThis label is in use for minor version incrementsThis label is in use for minor version increments