Class EventsourcedEnsemble

    • Constructor Detail

    • Method Detail

      • afterRequestRecoveryPermit

        public void afterRequestRecoveryPermit​(ActorRef actorRef,
                                               java.lang.Object context)
        Description copied from interface: EventsourcedInstrumentation
        Record after a recovery permit is requested.

        Specified by:
        afterRequestRecoveryPermit in interface EventsourcedInstrumentation
        Parameters:
        actorRef - the ActorRef for which the recovery permit is requested
        context - returned by beforeRequestRecoveryPermit
      • beforeRequestRecoveryPermit

        public java.lang.Object beforeRequestRecoveryPermit​(ActorRef actorRef)
        Description copied from interface: EventsourcedInstrumentation
        Record before a recovery permit is requested.

        Specified by:
        beforeRequestRecoveryPermit in interface EventsourcedInstrumentation
        Parameters:
        actorRef - the ActorRef for which the recovery permit is about to be requested
        Returns:
        context that will be passed to afterRequestRecoveryPermit
      • dependencies

        public scala.collection.immutable.Seq<java.lang.String> dependencies()
        Description copied from interface: EventsourcedInstrumentation
        Optional dependencies for this instrumentation.

        Dependency instrumentations will always be ordered before this instrumentation.

        Specified by:
        dependencies in interface EventsourcedInstrumentation
        Returns:
        list of class names for optional instrumentation dependencies
      • persistEventCalled

        public java.lang.Object persistEventCalled​(ActorRef actorRef,
                                                   java.lang.Object event,
                                                   java.lang.Object command)
        Description copied from interface: EventsourcedInstrumentation
        Record persist event.

        Specified by:
        persistEventCalled in interface EventsourcedInstrumentation
        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
      • persistEventDone

        public void persistEventDone​(ActorRef actorRef,
                                     java.lang.Object context)
        Description copied from interface: EventsourcedInstrumentation
        Record event is written and the registered callback is called.

        Specified by:
        persistEventDone in interface EventsourcedInstrumentation
        Parameters:
        actorRef - the ActorRef for which the event has been successfully persisted.
        context - context returned by persistEventWritten
      • persistEventWritten

        public java.lang.Object persistEventWritten​(ActorRef actorRef,
                                                    java.lang.Object event,
                                                    java.lang.Object context)
        Description copied from interface: EventsourcedInstrumentation
        Record event is written but the registered callback has not been called yet

        Specified by:
        persistEventWritten in interface EventsourcedInstrumentation
        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
      • persistFailed

        public void persistFailed​(ActorRef actorRef,
                                  java.lang.Throwable throwable,
                                  java.lang.Object event,
                                  long seqNr,
                                  java.lang.Object context)
        Description copied from interface: EventsourcedInstrumentation
        Record persistence persist failure.

        Specified by:
        persistFailed in interface EventsourcedInstrumentation
        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

        public void persistRejected​(ActorRef actorRef,
                                    java.lang.Throwable throwable,
                                    java.lang.Object event,
                                    long seqNr,
                                    java.lang.Object context)
        Description copied from interface: EventsourcedInstrumentation
        Record persistence persist failure.

        Specified by:
        persistRejected in interface EventsourcedInstrumentation
        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
      • recoveryFailed

        public void recoveryFailed​(ActorRef actorRef,
                                   java.lang.Throwable throwable,
                                   java.lang.Object event)
        Description copied from interface: EventsourcedInstrumentation
        Record persistence recovery failure.

        Specified by:
        recoveryFailed in interface EventsourcedInstrumentation
        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)