IActorStateProvider.LoadStateAsync<T> Method
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.
Loads the actor state associated with the specified state name for the specified actor ID.
public System.Threading.Tasks.Task<T> LoadStateAsync<T> (Microsoft.ServiceFabric.Actors.ActorId actorId, string stateName, System.Threading.CancellationToken cancellationToken = default);
abstract member LoadStateAsync : Microsoft.ServiceFabric.Actors.ActorId * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public Function LoadStateAsync(Of T) (actorId As ActorId, stateName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Type Parameters
- T
Type of value of actor state associated with given state name.
Parameters
- actorId
- ActorId
ID of the actor for which to load the state.
- stateName
- String
Name of the actor state to load.
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests.
Returns
A task that represents the asynchronous load operation. The value of TResult parameter contains value of actor state associated with given state name.
Exceptions
Actor state associated with specified state name does not exist.
The operation was canceled.
Applies to
Azure SDK for .NET