Nexus API Reference

AbstractDurableStateActor
in package

AbstractYes

Class-based OOP alternative to the functional DurableStateBehavior API.

Users extend this class and override abstract methods to define their domain logic. The actor delegates to DurableStateEngine::create() for recovery and persistence handling.

Tags
template

The state type

psalm-api

Table of Contents

Methods

__construct()  : mixed
emptyState()  : S
The initial empty state before any state has been persisted.
handleCommand()  : DurableEffect
Handle a command and return a DurableEffect describing what should happen.
persistenceId()  : PersistenceId
The unique persistence identity for this actor.
toBehavior()  : Behavior
Build a Behavior by delegating to DurableStateEngine::create().
toProps()  : Props
Build Props from the behavior, ready for spawning.
withWriterId()  : static

Methods

emptyState()

The initial empty state before any state has been persisted.

public abstract emptyState() : S
Return values
S

withWriterId()

public withWriterId(Ulid $writerId) : static
Parameters
$writerId : Ulid
Return values
static
On this page

Search results