Class EntityTypeKey<T>
- java.lang.Object
-
- akka.cluster.sharding.typed.javadsl.EntityTypeKey<T>
-
- Direct Known Subclasses:
EntityTypeKeyImpl
public abstract class EntityTypeKey<T> extends java.lang.Object
Name of the entity type.
-
-
Constructor Summary
Constructors Constructor Description EntityTypeKey()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description EntityTypeKey<T>
asScala()
INTERNAL APIstatic <T> EntityTypeKey<T>
create(java.lang.Class<T> messageClass, java.lang.String name)
abstract java.lang.String
name()
abstract PersistenceId
persistenceIdFrom(java.lang.String entityId)
Constructs aPersistenceId
from thisEntityTypeKey
and the givenentityId
by concatenating them with|
separator.abstract EntityTypeKey<T>
withEntityIdSeparator(java.lang.String separator)
Specify a custom separator for compatibility with old naming conventions.
-
-
-
Method Detail
-
create
public static <T> EntityTypeKey<T> create(java.lang.Class<T> messageClass, java.lang.String name)
-
name
public abstract java.lang.String name()
-
asScala
public EntityTypeKey<T> asScala()
INTERNAL API- Returns:
- (undocumented)
-
persistenceIdFrom
public abstract PersistenceId persistenceIdFrom(java.lang.String entityId)
Constructs aPersistenceId
from thisEntityTypeKey
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 inEntityTypeKey.withEntityIdSeparator
.- Parameters:
entityId
- (undocumented)- Returns:
- (undocumented)
-
withEntityIdSeparator
public abstract EntityTypeKey<T> withEntityIdSeparator(java.lang.String separator)
Specify a custom separator for compatibility with old naming conventions. The separator is used between theEntityTypeKey
and theentityId
when constructing apersistenceId
withEntityTypeKey.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.- Parameters:
separator
- (undocumented)- Returns:
- (undocumented)
-
-