[doc] document TypeKey in persistence (#28369)
* [doc] document TypeKey in persistence * [doc] document TypeKey in persistence * [doc] document TypeKey in persistence * [doc] update to suggestion of raboof
This commit is contained in:
parent
c337bf5287
commit
b5576870fc
3 changed files with 3 additions and 0 deletions
|
|
@ -131,6 +131,7 @@ object AccountExampleWithCommandHandlersInState {
|
||||||
throw new IllegalStateException(s"unexpected event [$event] in state [ClosedAccount]")
|
throw new IllegalStateException(s"unexpected event [$event] in state [ClosedAccount]")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when used with sharding, this TypeKey can be used in `sharding.init` and `sharding.entityRefFor`:
|
||||||
val TypeKey: EntityTypeKey[Command[_]] =
|
val TypeKey: EntityTypeKey[Command[_]] =
|
||||||
EntityTypeKey[Command[_]]("Account")
|
EntityTypeKey[Command[_]]("Account")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ object AccountExampleWithEventHandlersInState {
|
||||||
throw new IllegalStateException(s"unexpected event [$event] in state [ClosedAccount]")
|
throw new IllegalStateException(s"unexpected event [$event] in state [ClosedAccount]")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when used with sharding, this TypeKey can be used in `sharding.init` and `sharding.entityRefFor`:
|
||||||
val TypeKey: EntityTypeKey[Command[_]] =
|
val TypeKey: EntityTypeKey[Command[_]] =
|
||||||
EntityTypeKey[Command[_]]("Account")
|
EntityTypeKey[Command[_]]("Account")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ object AccountExampleWithOptionState {
|
||||||
throw new IllegalStateException(s"unexpected event [$event] in state [ClosedAccount]")
|
throw new IllegalStateException(s"unexpected event [$event] in state [ClosedAccount]")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// when used with sharding, this TypeKey can be used in `sharding.init` and `sharding.entityRefFor`:
|
||||||
val TypeKey: EntityTypeKey[Command[_]] =
|
val TypeKey: EntityTypeKey[Command[_]] =
|
||||||
EntityTypeKey[Command[_]]("Account")
|
EntityTypeKey[Command[_]]("Account")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue