Package akka.persistence.telemetry
Class EventsourcedEnsemble
- java.lang.Object
-
- akka.persistence.telemetry.EventsourcedEnsemble
-
- All Implemented Interfaces:
EventsourcedInstrumentation
public class EventsourcedEnsemble extends java.lang.Object implements EventsourcedInstrumentation
INTERNAL API
-
-
Constructor Summary
Constructors Constructor Description EventsourcedEnsemble(scala.collection.immutable.Seq<EventsourcedInstrumentation> instrumentations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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<EventsourcedInstrumentation>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
-
EventsourcedEnsemble
public EventsourcedEnsemble(scala.collection.immutable.Seq<EventsourcedInstrumentation> instrumentations)
-
-
Method Detail
-
afterRequestRecoveryPermit
public void afterRequestRecoveryPermit(ActorRef actorRef, java.lang.Object context)
Description copied from interface:EventsourcedInstrumentationRecord after a recovery permit is requested.- Specified by:
afterRequestRecoveryPermitin interfaceEventsourcedInstrumentation- Parameters:
actorRef- theActorReffor which the recovery permit is requestedcontext- returned bybeforeRequestRecoveryPermit
-
beforeRequestRecoveryPermit
public java.lang.Object beforeRequestRecoveryPermit(ActorRef actorRef)
Description copied from interface:EventsourcedInstrumentationRecord before a recovery permit is requested.- Specified by:
beforeRequestRecoveryPermitin interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationOptional dependencies for this instrumentation.Dependency instrumentations will always be ordered before this instrumentation.
- Specified by:
dependenciesin interfaceEventsourcedInstrumentation- Returns:
- list of class names for optional instrumentation dependencies
-
instrumentations
public scala.collection.immutable.Seq<EventsourcedInstrumentation> instrumentations()
-
persistEventCalled
public java.lang.Object persistEventCalled(ActorRef actorRef, java.lang.Object event, java.lang.Object command)
Description copied from interface:EventsourcedInstrumentationRecord persist event.- Specified by:
persistEventCalledin interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord event is written and the registered callback is called.- Specified by:
persistEventDonein interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord event is written but the registered callback has not been called yet- Specified by:
persistEventWrittenin interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord persistence persist failure.- Specified by:
persistFailedin interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord persistence persist failure.- Specified by:
persistRejectedin interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord persistence recovery done.- Specified by:
recoveryDonein interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord persistence recovery failure.- Specified by:
recoveryFailedin interfaceEventsourcedInstrumentation- 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:EventsourcedInstrumentationRecord persistence recovery started.- Specified by:
recoveryStartedin interfaceEventsourcedInstrumentation- Parameters:
actorRef- theActorReffor which the recovery is started.
-
-