Package akka.persistence.typed.telemetry
Interface DurableStateBehaviorInstrumentation
-
- All Known Implementing Classes:
DurableStateBehaviorEnsemble
,EmptyDurableStateBehaviorInstrumentation
,EmptyDurableStateBehaviorInstrumentation$
public interface DurableStateBehaviorInstrumentation
INTERNAL API: Instrumentation SPI for DurableStateBehavior.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
actorInitialized(ActorRef<?> actorRef)
Initialize state for an EventSourcedBehavior actor.void
afterRequestRecoveryPermit(ActorRef<?> actorRef, java.lang.Object context)
Record after a recovery permit is requested.java.lang.Object
beforeRequestRecoveryPermit(ActorRef<?> actorRef)
Record before a recovery permit is requested.java.lang.Object
deleteStateCalled(ActorRef<?> actorRef, java.lang.Object command)
Record delete state.scala.collection.immutable.Seq<java.lang.String>
dependencies()
Optional dependencies for this instrumentation.void
persistFailed(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object state, long revision, java.lang.Object context)
Record persistence persist failure.java.lang.Object
persistStateCalled(ActorRef<?> actorRef, java.lang.Object state, java.lang.Object command)
Record persist state.void
persistStateDone(ActorRef<?> actorRef, java.lang.Object context)
Record state is written and the registered callback is called.java.lang.Object
persistStateWritten(ActorRef<?> actorRef, java.lang.Object state, java.lang.Object context)
Record state is written but the registered callback has not been called yetvoid
recoveryDone(ActorRef<?> actorRef)
Record persistence recovery done.void
recoveryFailed(ActorRef<?> actorRef, java.lang.Throwable throwable)
Record persistence recovery failure.void
recoveryStarted(ActorRef<?> actorRef)
Record persistence recovery started.
-
-
-
Method Detail
-
actorInitialized
void actorInitialized(ActorRef<?> actorRef)
Initialize state for an EventSourcedBehavior actor.
-
beforeRequestRecoveryPermit
java.lang.Object beforeRequestRecoveryPermit(ActorRef<?> actorRef)
Record before a recovery permit is requested.- Parameters:
actorRef
- theActorRef
for which the recovery permit is about to be requested- Returns:
- context that will be passed to
afterRequestRecoveryPermit
-
afterRequestRecoveryPermit
void afterRequestRecoveryPermit(ActorRef<?> actorRef, java.lang.Object context)
Record after a recovery permit is requested.- Parameters:
actorRef
- theActorRef
for which the recovery permit is requestedcontext
- returned bybeforeRequestRecoveryPermit
-
recoveryStarted
void recoveryStarted(ActorRef<?> actorRef)
Record persistence recovery started.- Parameters:
actorRef
- theActorRef
for which the recovery is started.
-
recoveryDone
void recoveryDone(ActorRef<?> actorRef)
Record persistence recovery done.- Parameters:
actorRef
- theActorRef
for which the recovery is finished.
-
recoveryFailed
void recoveryFailed(ActorRef<?> actorRef, java.lang.Throwable throwable)
Record persistence recovery failure.- Parameters:
actorRef
- theActorRef
for which the recovery has failed.throwable
- the cause of the failure.
-
persistStateCalled
java.lang.Object persistStateCalled(ActorRef<?> actorRef, java.lang.Object state, java.lang.Object command)
Record persist state.- Parameters:
actorRef
- theActorRef
for which the state will be sent to the store.state
- the state that was submitted for persistence.command
- actor message (command) for which the state update was emitted.- Returns:
- context that will be passed to
persistStateWritten
-
deleteStateCalled
java.lang.Object deleteStateCalled(ActorRef<?> actorRef, java.lang.Object command)
Record delete state.- Parameters:
actorRef
- theActorRef
for which the delete state will be sent to the store.command
- actor message (command) for which the state update was emitted.- Returns:
- context that will be passed to
persistStateWritten
-
persistStateWritten
java.lang.Object persistStateWritten(ActorRef<?> actorRef, java.lang.Object state, java.lang.Object context)
Record state is written but the registered callback has not been called yet- Parameters:
actorRef
- theActorRef
for which the state has been successfully persisted.state
- the state that was stored in the journal.context
- context returned bypersistStateCalled
- Returns:
- context that will be passed to
persistStateDone
-
persistStateDone
void persistStateDone(ActorRef<?> actorRef, java.lang.Object context)
Record state is written and the registered callback is called.- Parameters:
actorRef
- theActorRef
for which the state has been successfully persisted.context
- context returned bypersistStateWritten
-
persistFailed
void persistFailed(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object state, long revision, java.lang.Object context)
Record persistence persist failure.- Parameters:
actorRef
- theActorRef
for which the recovery has failed.throwable
- the cause of the failure.state
- the state that was to be persisted.revision
- the sequence number associated with the failurecontext
- context returned bypersistStateCalled
-
dependencies
scala.collection.immutable.Seq<java.lang.String> dependencies()
Optional dependencies for this instrumentation.Dependency instrumentations will always be ordered before this instrumentation.
- Returns:
- list of class names for optional instrumentation dependencies
-
-