IActorStateProvider Interface


Represents the interface that an actor state provider needs to implement for actor runtime to communicate with it.

public interface IActorStateProvider : Microsoft.ServiceFabric.Data.IStateProviderReplica2
type IActorStateProvider = interface
    interface IStateProviderReplica2
    interface IStateProviderReplica
Public Interface IActorStateProvider
Implements IStateProviderReplica2



Function called after restore has been performed on the replica.

(Inherited from IStateProviderReplica2)


ActorActivatedAsync(ActorId, CancellationToken)

Invoked as part of the activation process of the actor with the specified actor ID.

ContainsStateAsync(ActorId, String, CancellationToken)

Checks whether actor state provider contains an actor state with specified state name for the specified actor ID.

DeleteReminderAsync(ActorId, String, CancellationToken)

Deletes the actor reminder with the given reminder name if it exists

DeleteRemindersAsync(IReadOnlyDictionary<ActorId,IReadOnlyCollection<String>>, CancellationToken)

Deletes the specified set of reminders.

EnumerateStateNamesAsync(ActorId, CancellationToken)

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

GetActorsAsync(Int32, ContinuationToken, CancellationToken)

Gets the requested number of ActorID's from the state provider.


Initializes the actor state provider with type information of the actor type associated with it.


Loads all the reminders contained in the actor state provider.

LoadStateAsync<T>(ActorId, String, CancellationToken)

Loads the actor state associated with the specified state name for the specified actor ID.

ReminderCallbackCompletedAsync(ActorId, IActorReminder, CancellationToken)

Invoked when a reminder fires and finishes executing its callback ReceiveReminderAsync(String, Byte[], TimeSpan, TimeSpan) successfully.

RemoveActorAsync(ActorId, CancellationToken)

Removes all the existing states and reminders associated with specified actor ID atomically.

SaveReminderAsync(ActorId, IActorReminder, CancellationToken)

Saves the specified actor ID reminder. If an actor reminder with given name does not exist, it adds the actor reminder otherwise existing actor reminder with same name is updated.

SaveStateAsync(ActorId, IReadOnlyCollection<ActorStateChange>, CancellationToken)

Saves the specified set of actor state changes for the specified actor ID atomically.

Applies to