Add paramater documentation for event sourced entities (#28540)
* Add paramater documentation for event sourced entities Useful for help in IDEs, text taken from the docs. * whitespace Co-authored-by: Arnout Engelen <github@bzzt.net>
This commit is contained in:
parent
a6cc73b447
commit
0d57c71766
2 changed files with 12 additions and 0 deletions
|
|
@ -23,10 +23,17 @@ abstract class EventSourcedBehavior[Command, Event, State] private[akka] (
|
|||
onPersistFailure: Optional[BackoffSupervisorStrategy])
|
||||
extends DeferredBehavior[Command] {
|
||||
|
||||
/**
|
||||
* @param persistenceId stable unique identifier for the event sourced behavior
|
||||
*/
|
||||
def this(persistenceId: PersistenceId) = {
|
||||
this(persistenceId, Optional.empty[BackoffSupervisorStrategy])
|
||||
}
|
||||
|
||||
/**
|
||||
* @param persistenceId stable unique identifier for the event sourced behavior
|
||||
* @param onPersistFailure BackoffSupervisionStrategy for persist failures
|
||||
*/
|
||||
def this(persistenceId: PersistenceId, onPersistFailure: BackoffSupervisorStrategy) = {
|
||||
this(persistenceId, Optional.ofNullable(onPersistFailure))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ object EventSourcedBehavior {
|
|||
|
||||
/**
|
||||
* Create a `Behavior` for a persistent actor.
|
||||
*
|
||||
* @param persistenceId stable unique identifier for the event sourced behavior
|
||||
* @param emtpyState the intial state for the entity before any events have been processed
|
||||
* @param commandHandler map commands to effects e.g. persisting events, replying to commands
|
||||
* @param evnetHandler compute the new state given the current state when an event has been persisted
|
||||
*/
|
||||
def apply[Command, Event, State](
|
||||
persistenceId: PersistenceId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue