public abstract class PersistentEntity.CommandContext<R> extends PersistentEntity.ReadOnlyCommandContext<R>
Constructor and Description |
---|
CommandContext() |
Modifier and Type | Method and Description |
---|---|
<B extends Event> |
done()
A command handler may return this
Persist directive to define
that no events are to be persisted. |
<B extends Event> |
thenPersist(B event)
A command handler may return this
Persist directive to define
that one event is to be persisted. |
<B extends Event> |
thenPersist(B event,
Consumer<B> afterPersist)
A command handler may return this
Persist directive to define
that one event is to be persisted. |
<B extends Event> |
thenPersistAll(akka.japi.Effect afterPersist,
Object... events)
A command handler may return this
Persist directive to define
that several events are to be persisted. |
<B extends Event> |
thenPersistAll(akka.japi.Effect afterPersist,
scala.collection.Seq<B> events)
A command handler may return this
Persist directive to define
that several events are to be persisted. |
<B extends Event> |
thenPersistAll(List<B> events)
A command handler may return this
Persist directive to define
that several events are to be persisted. |
<B extends Event> |
thenPersistAll(List<B> events,
akka.japi.Effect afterPersist)
A command handler may return this
Persist directive to define
that several events are to be persisted. |
commandFailed, invalidCommand, reply
public <B extends Event> PersistentEntity.Persist<B> thenPersistAll(akka.japi.Effect afterPersist, Object... events)
Persist
directive to define
that several events are to be persisted. External side effects can be
performed after successful persist in the afterPersist
function.
afterPersist
is invoked once when all events have been persisted
successfully.public <B extends Event> PersistentEntity.Persist<B> thenPersist(B event)
Persist
directive to define
that one event is to be persisted.public <B extends Event> PersistentEntity.Persist<B> thenPersist(B event, Consumer<B> afterPersist)
Persist
directive to define
that one event is to be persisted. External side effects can be
performed after successful persist in the afterPersist
function.public <B extends Event> PersistentEntity.Persist<B> thenPersistAll(List<B> events)
Persist
directive to define
that several events are to be persisted.public <B extends Event> PersistentEntity.Persist<B> thenPersistAll(List<B> events, akka.japi.Effect afterPersist)
Persist
directive to define
that several events are to be persisted. External side effects can be
performed after successful persist in the afterPersist
function.
afterPersist
is invoked once when all events have been persisted
successfully.public <B extends Event> PersistentEntity.Persist<B> thenPersistAll(akka.japi.Effect afterPersist, scala.collection.Seq<B> events)
Persist
directive to define
that several events are to be persisted. External side effects can be
performed after successful persist in the afterPersist
function.
afterPersist
is invoked once when all events have been persisted
successfully.public <B extends Event> PersistentEntity.Persist<B> done()
Persist
directive to define
that no events are to be persisted.