ActorStateProvider.saveStateAsync(ActorId actorId, List<ActorStateChange> stateChanges, CancellationToken cancellationToken) Method

定义

Saves the specified set of actor state changes atomically.

Remarks: The collection of state changes should contain only one item for a given state name. The save operation will fail on trying to add an actor state which already exists or update/remove an actor state which does not exist.

public CompletableFuture<?> saveStateAsync(ActorId actorId, List<ActorStateChange> stateChanges, CancellationToken cancellationToken)

参数

actorId
ActorId

ID of the actor for which to save the state changes.

stateChanges
List<ActorStateChange>

Collection of state changes to save.

cancellationToken
CancellationToken

system.fabric.CancellationToken object to indicate the cancellation status of the operation.

返回

CompletableFuture<?>

A task that represents the asynchronous save operation.

适用于