[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:
Robert Stoll 2019-12-16 13:49:18 +01:00 committed by Arnout Engelen
parent c337bf5287
commit b5576870fc
3 changed files with 3 additions and 0 deletions

View file

@ -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")

View file

@ -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")

View file

@ -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")