FabricActor Class
- java.
lang. Object - ActorBase
- microsoft.
servicefabric. actors. runtime. FabricActor
- microsoft.
public class FabricActor extends ActorBase
Represents a actor that can have multiple reliable 'named' states associated with it. ActorBase
Remarks:The state is preserved across actor garbage collections and fail-overs. The storage and retrieval of the state is provided by the actor state provider ActorStateProvider.
Constructor Summary
Constructor | Description |
---|---|
FabricActor(FabricActorService actorService, ActorId actorId) |
Initializes a new instance of FabricActor |
Method Summary
Modifier and Type | Method and Description |
---|---|
Actor |
getStateManager()
Gets the state manager for FabricActor which can be used to get/add/update/remove named states. |
CompletableFuture<?> |
saveStateAsync()
Saves all the state changes (add/update/remove) that were made since last call to saveStateAsync(), to the actor state provider associated with the actor. |
Actor |
stateManager()
Gets the state manager for FabricActor which can be used to get/add/update/remove named states. |
Inherited Members
Constructor Details
FabricActor
protected FabricActor(FabricActorService actorService, ActorId actorId)
Initializes a new instance of FabricActor
Parameters:
Method Details
getStateManager
public ActorStateManager getStateManager()
Gets the state manager for FabricActor which can be used to get/add/update/remove named states.
Returns:
saveStateAsync
protected CompletableFuture saveStateAsync()
Saves all the state changes (add/update/remove) that were made since last call to saveStateAsync(), to the actor state provider associated with the actor.
Returns:
stateManager
public ActorStateManager stateManager()
Gets the state manager for FabricActor which can be used to get/add/update/remove named states.
Returns:
Applies to
Azure SDK for Java