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 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.scala.collection.immutable.Seq<EventsourcedInstrumentation>
instrumentations()
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 yetvoid
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.
-
-
-
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:EventsourcedInstrumentation
Record after a recovery permit is requested.- Specified by:
afterRequestRecoveryPermit
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
for which the recovery permit is requestedcontext
- returned bybeforeRequestRecoveryPermit
-
beforeRequestRecoveryPermit
public java.lang.Object beforeRequestRecoveryPermit(ActorRef actorRef)
Description copied from interface:EventsourcedInstrumentation
Record before a recovery permit is requested.- Specified by:
beforeRequestRecoveryPermit
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
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 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:EventsourcedInstrumentation
Record persist event.- Specified by:
persistEventCalled
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
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 interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
for 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:EventsourcedInstrumentation
Record event is written but the registered callback has not been called yet- Specified by:
persistEventWritten
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
for 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:EventsourcedInstrumentation
Record persistence persist failure.- Specified by:
persistFailed
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
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 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:EventsourcedInstrumentation
Record persistence persist failure.- Specified by:
persistRejected
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
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 failurecontext
- context returned bypersistEventCalled
-
recoveryDone
public void recoveryDone(ActorRef actorRef)
Description copied from interface:EventsourcedInstrumentation
Record persistence recovery done.- Specified by:
recoveryDone
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
for which the recovery is finished.
-
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 interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
for 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:EventsourcedInstrumentation
Record persistence recovery started.- Specified by:
recoveryStarted
in interfaceEventsourcedInstrumentation
- Parameters:
actorRef
- theActorRef
for which the recovery is started.
-
-