Package akka.persistence.typed.telemetry
Class EventSourcedBehaviorEnsemble
- java.lang.Object
-
- akka.persistence.typed.telemetry.EventSourcedBehaviorEnsemble
-
- All Implemented Interfaces:
EventSourcedBehaviorInstrumentation
public class EventSourcedBehaviorEnsemble extends java.lang.Object implements EventSourcedBehaviorInstrumentation
INTERNAL API
-
-
Constructor Summary
Constructors Constructor Description EventSourcedBehaviorEnsemble(scala.collection.immutable.Seq<EventSourcedBehaviorInstrumentation> instrumentations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactorInitialized(ActorRef<?> actorRef)Initialize state for an EventSourcedBehavior actor.voidafterRequestRecoveryPermit(ActorRef<?> actorRef, java.lang.Object context)Record after a recovery permit is requested.java.lang.ObjectbeforeRequestRecoveryPermit(ActorRef<?> actorRef)Record before a recovery permit is requested.scala.collection.immutable.Seq<java.lang.String>dependencies()Optional dependencies for this instrumentation.scala.collection.immutable.Seq<EventSourcedBehaviorInstrumentation>instrumentations()java.lang.ObjectpersistEventCalled(ActorRef<?> actorRef, java.lang.Object event, java.lang.Object command)Record persist event.voidpersistEventDone(ActorRef<?> actorRef, java.lang.Object context)Record event is written and the registered callback is called.java.lang.ObjectpersistEventWritten(ActorRef<?> actorRef, java.lang.Object event, java.lang.Object context)Record event is written but the registered callback has not been called yetvoidpersistFailed(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object event, long seqNr, java.lang.Object context)Record persistence persist failure.voidpersistRejected(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object event, long seqNr, java.lang.Object context)Record persistence persist failure.voidrecoveryDone(ActorRef<?> actorRef)Record persistence recovery done.voidrecoveryFailed(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object event)Record persistence recovery failure.voidrecoveryStarted(ActorRef<?> actorRef)Record persistence recovery started.
-
-
-
Constructor Detail
-
EventSourcedBehaviorEnsemble
public EventSourcedBehaviorEnsemble(scala.collection.immutable.Seq<EventSourcedBehaviorInstrumentation> instrumentations)
-
-
Method Detail
-
actorInitialized
public void actorInitialized(ActorRef<?> actorRef)
Description copied from interface:EventSourcedBehaviorInstrumentationInitialize state for an EventSourcedBehavior actor.- Specified by:
actorInitializedin interfaceEventSourcedBehaviorInstrumentation
-
afterRequestRecoveryPermit
public void afterRequestRecoveryPermit(ActorRef<?> actorRef, java.lang.Object context)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord after a recovery permit is requested.- Specified by:
afterRequestRecoveryPermitin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor which the recovery permit is requestedcontext- returned bybeforeRequestRecoveryPermit
-
beforeRequestRecoveryPermit
public java.lang.Object beforeRequestRecoveryPermit(ActorRef<?> actorRef)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord before a recovery permit is requested.- Specified by:
beforeRequestRecoveryPermitin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor 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:EventSourcedBehaviorInstrumentationOptional dependencies for this instrumentation.Dependency instrumentations will always be ordered before this instrumentation.
- Specified by:
dependenciesin interfaceEventSourcedBehaviorInstrumentation- Returns:
- list of class names for optional instrumentation dependencies
-
instrumentations
public scala.collection.immutable.Seq<EventSourcedBehaviorInstrumentation> instrumentations()
-
persistEventCalled
public java.lang.Object persistEventCalled(ActorRef<?> actorRef, java.lang.Object event, java.lang.Object command)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord persist event.- Specified by:
persistEventCalledin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor 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:EventSourcedBehaviorInstrumentationRecord event is written and the registered callback is called.- Specified by:
persistEventDonein interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor which the event has been successfully persisted.context- context returned bypersistEventWritten
-
persistEventWritten
public java.lang.Object persistEventWritten(ActorRef<?> actorRef, java.lang.Object event, java.lang.Object context)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord event is written but the registered callback has not been called yet- Specified by:
persistEventWrittenin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor which the event has been successfully persisted.event- the event that was stored in the journal.context- context returned bypersistEventCalled- 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:EventSourcedBehaviorInstrumentationRecord persistence persist failure.- Specified by:
persistFailedin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor 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 failurecontext- context returned bypersistEventCalled
-
persistRejected
public void persistRejected(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object event, long seqNr, java.lang.Object context)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord persistence persist failure.- Specified by:
persistRejectedin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor 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 failurecontext- context returned bypersistEventCalled
-
recoveryDone
public void recoveryDone(ActorRef<?> actorRef)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord persistence recovery done.- Specified by:
recoveryDonein interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor which the recovery is finished.
-
recoveryFailed
public void recoveryFailed(ActorRef<?> actorRef, java.lang.Throwable throwable, java.lang.Object event)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord persistence recovery failure.- Specified by:
recoveryFailedin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor which the recovery has failed.throwable- the cause of the failure.event- the event that was replayed, if any (otherwise null)
-
recoveryStarted
public void recoveryStarted(ActorRef<?> actorRef)
Description copied from interface:EventSourcedBehaviorInstrumentationRecord persistence recovery started.- Specified by:
recoveryStartedin interfaceEventSourcedBehaviorInstrumentation- Parameters:
actorRef- theActorReffor which the recovery is started.
-
-