ActorStateManager.setStateAsync Method

定义

重载

setStateAsync(String stateName, T value)

Removes an actor state with specified state name. If an actor state with specified name does not exist, it is added.

setStateAsync(String stateName, T value, CancellationToken cancellationToken)

Removes an actor state with specified state name. If an actor state with specified name does not exist, it is added.

setStateAsync(String stateName, T value)

Removes an actor state with specified state name. If an actor state with specified name does not exist, it is added.

public <T> CompletableFuture<?> setStateAsync(String stateName, T value)

参数

stateName
String

Name of the actor state to set.

value
T

Value of the actor state to set.

返回

<T> CompletableFuture<?>

A task that represents the asynchronous set operation.

setStateAsync(String stateName, T value, CancellationToken cancellationToken)

Removes an actor state with specified state name. If an actor state with specified name does not exist, it is added.

public <T> CompletableFuture<?> setStateAsync(String stateName, T value, CancellationToken cancellationToken)

参数

stateName
String

Name of the actor state to set.

value
T

Value of the actor state to set.

cancellationToken
CancellationToken

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

返回

<T> CompletableFuture<?>

A task that represents the asynchronous set operation.

适用于