Aracılığıyla paylaş


KvsActorStateProviderBase.IActorStateProvider.LoadStateAsync<T> Method

Definition

Loads the actor state associated with the specified state name.

System.Threading.Tasks.Task<T> IActorStateProvider.LoadStateAsync<T> (Microsoft.ServiceFabric.Actors.ActorId actorId, string stateName, System.Threading.CancellationToken cancellationToken);
abstract member Microsoft.ServiceFabric.Actors.Runtime.IActorStateProvider.LoadStateAsync : Microsoft.ServiceFabric.Actors.ActorId * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
override this.Microsoft.ServiceFabric.Actors.Runtime.IActorStateProvider.LoadStateAsync : Microsoft.ServiceFabric.Actors.ActorId * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Function LoadStateAsync(Of T) (actorId As ActorId, stateName As String, cancellationToken As CancellationToken) As Task(Of T) Implements IActorStateProvider.LoadStateAsync

Type Parameters

T

The type of value of actor state associated with given state name.

Parameters

actorId
ActorId

The ID of the actor for which to load the state.

stateName
String

The name of the actor state to load.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

Task<T>

A task that represents the asynchronous load operation. The value of TResult parameter contains value of actor state associated with given state name.

Implements

Exceptions

The actor state associated with specified state name does not exist.

The operation was canceled.

Applies to