trait EntityTypeKey[T] extends AnyRef
The key of an entity type, the name
must be unique.
Not for user extension.
- Annotations
- @DoNotInherit()
- Source
- ClusterSharding.scala
- Alphabetic
- By Inheritance
- EntityTypeKey
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
name: String
Name of the entity type.
-
abstract
def
persistenceIdFrom(entityId: String): PersistenceId
Constructs a PersistenceId from this
EntityTypeKey
and the givenentityId
by concatenating them with|
separator.Constructs a PersistenceId from this
EntityTypeKey
and the givenentityId
by concatenating them with|
separator.The
|
separator is also used in Lagom'sscaladsl.PersistentEntity
but no separator is used in Lagom'sjavadsl.PersistentEntity
. For compatibility with Lagom'sjavadsl.PersistentEntity
you should use""
as the separator in EntityTypeKey.withEntityIdSeparator. -
abstract
def
withEntityIdSeparator(separator: String): EntityTypeKey[T]
Specify a custom separator for compatibility with old naming conventions.
Specify a custom separator for compatibility with old naming conventions. The separator is used between the
EntityTypeKey
and theentityId
when constructing apersistenceId
with EntityTypeKey.persistenceIdFrom.The default
|
separator is also used in Lagom'sscaladsl.PersistentEntity
but no separator is used in Lagom'sjavadsl.PersistentEntity
. For compatibility with Lagom'sjavadsl.PersistentEntity
you should use""
as the separator here.