Interface DurableStateBehaviorInstrumentation

    • 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 - the ActorRef 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 - the ActorRef for which the recovery permit is requested
        context - returned by beforeRequestRecoveryPermit
      • recoveryStarted

        void recoveryStarted​(ActorRef<?> actorRef)
        Record persistence recovery started.

        Parameters:
        actorRef - the ActorRef for which the recovery is started.
      • recoveryDone

        void recoveryDone​(ActorRef<?> actorRef)
        Record persistence recovery done.

        Parameters:
        actorRef - the ActorRef for which the recovery is finished.
      • recoveryFailed

        void recoveryFailed​(ActorRef<?> actorRef,
                            java.lang.Throwable throwable)
        Record persistence recovery failure.

        Parameters:
        actorRef - the ActorRef 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 - the ActorRef 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 - the ActorRef 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 - the ActorRef for which the state has been successfully persisted.
        state - the state that was stored in the journal.
        context - context returned by persistStateCalled
        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 - the ActorRef for which the state has been successfully persisted.
        context - context returned by persistStateWritten
      • 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 - the ActorRef 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 failure
        context - context returned by persistStateCalled
      • 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