Constructs a new PersistedActor instance.
The parameters for initializing the persisted actor, including the actor's ID, the storage manager to use, and the actor creation logic. The optional locking mode determines the lock acquisition strategy.
Private
_actorPrivate
initiatedPrivate
paramsInitializes the actor by loading its state from the storage and setting it up with the provided actor creator.
A flag to prevent re-initialization if the actor has already been initiated.
Throws an error if the actor is already initiated and re-initialization is attempted.
Generated using TypeDoc
A class that extends the functionality of a standard actor with persistence and locking capabilities. It integrates with a storage manager that supports lock-enabled storage, allowing for controlled read/write access to the actor's state.
The class offers methods to initialize, save, and close the actor, managing its lifecycle and ensuring data integrity through optional locking during state persistence.
Use
withPersistableActor
to use this.