Share via


IActorStateProvider.EnumerateStateNamesAsync Method

Definition

Creates an enumerable of all the state names associated with specified actor ID.

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<string>> EnumerateStateNamesAsync (Microsoft.ServiceFabric.Actors.ActorId actorId, System.Threading.CancellationToken cancellationToken = default);
abstract member EnumerateStateNamesAsync : Microsoft.ServiceFabric.Actors.ActorId * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<string>>
Public Function EnumerateStateNamesAsync (actorId As ActorId, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of String))

Parameters

actorId
ActorId

ID of the actor for which to create enumerable.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

A task that represents the asynchronous enumeration operation. The value of TResult parameter is an enumerable of all state names associated with specified actor.

Exceptions

The operation was canceled.

Remarks

The enumerator returned from actor state provider is safe to use concurrently with reads and writes to the state provider. It represents a snapshot consistent view of the state provider.

Applies to