Class ReplicatedEventSourcedBehavior<Command,Event,State>
- java.lang.Object
-
- org.apache.pekko.actor.typed.Behavior<T>
-
- org.apache.pekko.actor.typed.internal.BehaviorImpl.DeferredBehavior<Command>
-
- org.apache.pekko.persistence.typed.javadsl.EventSourcedBehavior<Command,Event,State>
-
- org.apache.pekko.persistence.typed.javadsl.ReplicatedEventSourcedBehavior<Command,Event,State>
-
public abstract class ReplicatedEventSourcedBehavior<Command,Event,State> extends EventSourcedBehavior<Command,Event,State>
Base class for replicated event sourced behaviors.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pekko.actor.typed.Behavior
Behavior.BehaviorDecorators<Inner>, Behavior.BehaviorDecorators$
-
-
Constructor Summary
Constructors Constructor Description ReplicatedEventSourcedBehavior(ReplicationContext replicationContext)
ReplicatedEventSourcedBehavior(ReplicationContext replicationContext, java.util.Optional<BackoffSupervisorStrategy> onPersistFailure)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Behavior<Command>
apply(TypedActorContext<Command> context)
INTERNAL API: DeferredBehavior init, not for user extensionprotected ReplicationContext
getReplicationContext()
boolean
withEventPublishing()
Override and return false to disable events being published to the system event stream aspekko.persistence.typed.PublishedEvent
after they have been persisted.-
Methods inherited from class org.apache.pekko.persistence.typed.javadsl.EventSourcedBehavior
commandHandler, Effect, emptyState, eventAdapter, eventHandler, journalPluginConfig, journalPluginId, lastSequenceNumber, newCommandHandlerBuilder, newEventHandlerBuilder, newSignalHandlerBuilder, persistenceId, recovery, retentionCriteria, shouldSnapshot, signalHandler, snapshotAdapter, snapshotPluginConfig, snapshotPluginId, snapshotSelectionCriteria, tagsFor
-
Methods inherited from class org.apache.pekko.actor.typed.Behavior
BehaviorDecorators, canonicalize, existsInStack, interpretMessage, interpretSignal, isAlive, isDeferred, isUnhandled, narrow, start, validateAsInitial
-
-
-
-
Constructor Detail
-
ReplicatedEventSourcedBehavior
public ReplicatedEventSourcedBehavior(ReplicationContext replicationContext, java.util.Optional<BackoffSupervisorStrategy> onPersistFailure)
-
ReplicatedEventSourcedBehavior
public ReplicatedEventSourcedBehavior(ReplicationContext replicationContext)
-
-
Method Detail
-
apply
public Behavior<Command> apply(TypedActorContext<Command> context)
INTERNAL API: DeferredBehavior init, not for user extension- Overrides:
apply
in classEventSourcedBehavior<Command,Event,State>
-
getReplicationContext
protected ReplicationContext getReplicationContext()
-
withEventPublishing
public boolean withEventPublishing()
Override and return false to disable events being published to the system event stream aspekko.persistence.typed.PublishedEvent
after they have been persisted.
-
-