Interface EventsourcedInstrumentation

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.
      scala.collection.immutable.Seq<java.lang.String> dependencies()
      Optional dependencies for this instrumentation.
      java.lang.Object persistEventCalled​(ActorRef actorRef, java.lang.Object event, java.lang.Object command)
      Record persist event.
      void persistEventDone​(ActorRef actorRef, java.lang.Object context)
      Record event is written and the registered callback is called.
      java.lang.Object persistEventWritten​(ActorRef actorRef, java.lang.Object event, java.lang.Object context)
      Record event is written but the registered callback has not been called yet
      void persistFailed​(ActorRef actorRef, java.lang.Throwable throwable, java.lang.Object event, long seqNr, java.lang.Object context)
      Record persistence persist failure.
      void persistRejected​(ActorRef actorRef, java.lang.Throwable throwable, java.lang.Object event, long seqNr, java.lang.Object context)
      Record persistence persist failure.
      void recoveryDone​(ActorRef actorRef)
      Record persistence recovery done.
      void recoveryFailed​(ActorRef actorRef, java.lang.Throwable throwable, java.lang.Object event)
      Record persistence recovery failure.
      void recoveryStarted​(ActorRef actorRef)
      Record persistence recovery started.
    • Method Detail

      • 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,
                            java.lang.Object event)
        Record persistence recovery failure.

        Parameters:
        actorRef - the ActorRef for which the recovery has failed.
        throwable - the cause of the failure.
        event - the event that was replayed, if any (otherwise null)
      • persistEventCalled

        java.lang.Object persistEventCalled​(ActorRef actorRef,
                                            java.lang.Object event,
                                            java.lang.Object command)
        Record persist event.

        Parameters:
        actorRef - the ActorRef for which the event will be sent to the journal.
        event - the event that was submitted for persistence. For persist of several events it will be called for each event in the batch in the same order.
        command - actor message (command), if any (otherwise null), for which the event was emitted.
        Returns:
        context that will be passed to persistEventWritten
      • persistEventWritten

        java.lang.Object persistEventWritten​(ActorRef actorRef,
                                             java.lang.Object event,
                                             java.lang.Object context)
        Record event is written but the registered callback has not been called yet

        Parameters:
        actorRef - the ActorRef for which the event has been successfully persisted.
        event - the event that was stored in the journal.
        context - context returned by persistEventCalled
        Returns:
        context that will be passed to persistEventDone
      • persistEventDone

        void persistEventDone​(ActorRef actorRef,
                              java.lang.Object context)
        Record event is written and the registered callback is called.

        Parameters:
        actorRef - the ActorRef for which the event has been successfully persisted.
        context - context returned by persistEventWritten
      • persistFailed

        void persistFailed​(ActorRef actorRef,
                           java.lang.Throwable throwable,
                           java.lang.Object event,
                           long seqNr,
                           java.lang.Object context)
        Record persistence persist failure.

        Parameters:
        actorRef - the ActorRef for which the recovery has failed.
        throwable - the cause of the failure.
        event - the event that was to be persisted.
        seqNr - the sequence number associated with the failure
        context - context returned by persistEventCalled
      • persistRejected

        void persistRejected​(ActorRef actorRef,
                             java.lang.Throwable throwable,
                             java.lang.Object event,
                             long seqNr,
                             java.lang.Object context)
        Record persistence persist failure.

        Parameters:
        actorRef - the ActorRef for which the recovery has failed.
        throwable - the cause of the failure.
        event - the event that was to be persisted.
        seqNr - the sequence number associated with the failure
        context - context returned by persistEventCalled
      • 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