KvsActorStateProvider Class

Definition

Provides an implementation of IActorStateProvider which uses KeyValueStoreReplica to store and persist the actor state.

public sealed class KvsActorStateProvider : Microsoft.ServiceFabric.Actors.Runtime.KvsActorStateProviderBase
type KvsActorStateProvider = class
    inherit KvsActorStateProviderBase
Public NotInheritable Class KvsActorStateProvider
Inherits KvsActorStateProviderBase
Inheritance
KvsActorStateProvider

Constructors

KvsActorStateProvider()

Initializes a new instance of the KvsActorStateProvider class. Creates an instance of KvsActorStateProvider with default settings.

KvsActorStateProvider(Boolean, Int32)

Initializes a new instance of the KvsActorStateProvider class with specified settings.

KvsActorStateProvider(Boolean, KeyValueStoreReplicaSettings)

Initializes a new instance of the KvsActorStateProvider class with specified settings.

KvsActorStateProvider(ReplicatorSettings, LocalStoreSettings, KeyValueStoreReplicaSettings)

Initializes a new instance of the KvsActorStateProvider class with specified replicator and local key-value store settings.

Properties

OnDataLossAsync

Sets the function to be called during suspected data-loss.

(Inherited from KvsActorStateProviderBase)
OnRestoreCompletedAsync

Sets the function to be called after the partition state has been restored automatically by the system

(Inherited from KvsActorStateProviderBase)

Explicit Interface Implementations

IActorStateProvider.ActorActivatedAsync(ActorId, CancellationToken)

This method is invoked as part of the activation process of the actor with the specified Id.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.ContainsStateAsync(ActorId, String, CancellationToken)

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

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.DeleteReminderAsync(ActorId, String, CancellationToken)

Deletes the specified actor reminder if it exists.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.DeleteRemindersAsync(IReadOnlyDictionary<ActorId,IReadOnlyCollection<String>>, CancellationToken)

Deletes the specified set of reminders.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.EnumerateStateNamesAsync(ActorId, CancellationToken)

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

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.GetActorsAsync(Int32, ContinuationToken, CancellationToken)

Gets the ActorIds from the State Provider.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.GetRemindersAsync(Int32, ActorId, ContinuationToken, CancellationToken)

Gets the list of reminders from the state provider

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.Initialize(ActorTypeInformation)

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

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.LoadRemindersAsync(CancellationToken)

Loads all the reminders contained in the actor state provider.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.LoadStateAsync<T>(ActorId, String, CancellationToken)

Loads the actor state associated with the specified state name.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.ReminderCallbackCompletedAsync(ActorId, IActorReminder, CancellationToken)

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

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.RemoveActorAsync(ActorId, CancellationToken)

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

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.SaveReminderAsync(ActorId, IActorReminder, CancellationToken)

Saves the specified actor 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.

(Inherited from KvsActorStateProviderBase)
IActorStateProvider.SaveStateAsync(ActorId, IReadOnlyCollection<ActorStateChange>, CancellationToken)

Saves the specified set of actor state changes atomically.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.Abort()

Forcefully abort the state provider replica.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.BackupAsync(BackupOption, TimeSpan, CancellationToken, Func<BackupInfo,CancellationToken,Task<Boolean>>)

Performs backup of reliable state managed by this actor sate provider.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.BackupAsync(Func<BackupInfo,CancellationToken,Task<Boolean>>)

Performs a full backup of all reliable state managed by this actor sate provider.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.ChangeRoleAsync(ReplicaRole, CancellationToken)

Notify the state provider replica that its role is changing, for example to Primary or Secondary.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.CloseAsync(CancellationToken)

Gracefully close the state provider replica.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.Initialize(StatefulServiceInitializationParameters)

Initialize the state provider replica using the service initialization information.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.OpenAsync(ReplicaOpenMode, IStatefulServicePartition, CancellationToken)

Open the state provider replica for use.

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.RestoreAsync(String)

Restore a backup taken by BackupAsync(Func<BackupInfo,CancellationToken,Task<Boolean>>) or BackupAsync(BackupOption, TimeSpan, CancellationToken, Func<BackupInfo,CancellationToken,Task<Boolean>>).

(Inherited from KvsActorStateProviderBase)
IStateProviderReplica.RestoreAsync(String, RestorePolicy, CancellationToken)

Restore a backup taken by BackupAsync(Func<BackupInfo,CancellationToken,Task<Boolean>>) or BackupAsync(BackupOption, TimeSpan, CancellationToken, Func<BackupInfo,CancellationToken,Task<Boolean>>).

(Inherited from KvsActorStateProviderBase)

Applies to