Class EmptyEventSourcedBehaviorInstrumentation

    • Constructor Detail

      • EmptyEventSourcedBehaviorInstrumentation

        public EmptyEventSourcedBehaviorInstrumentation()
      • EmptyEventSourcedBehaviorInstrumentation

        public EmptyEventSourcedBehaviorInstrumentation​(ActorSystem<?> system)
    • Method Detail

      • recoveryFailed

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

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

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

        Specified by:
        persistEventCalled in interface EventSourcedBehaviorInstrumentation
        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

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

        Specified by:
        persistEventWritten in interface EventSourcedBehaviorInstrumentation
        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: EventSourcedBehaviorInstrumentation
        Record persistence persist failure.

        Specified by:
        persistFailed in interface EventSourcedBehaviorInstrumentation
        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: EventSourcedBehaviorInstrumentation
        Record persistence persist failure.

        Specified by:
        persistRejected in interface EventSourcedBehaviorInstrumentation
        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

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

        Dependency instrumentations will always be ordered before this instrumentation.

        Specified by:
        dependencies in interface EventSourcedBehaviorInstrumentation
        Returns:
        list of class names for optional instrumentation dependencies