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.ObjectName 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.Stringname()abstract PersistenceIdpersistenceIdFrom(java.lang.String entityId)Constructs aPersistenceIdfrom thisEntityTypeKeyand the givenentityIdby 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 aPersistenceIdfrom thisEntityTypeKeyand the givenentityIdby concatenating them with|separator.The
|separator is also used in Lagom'sscaladsl.PersistentEntitybut no separator is used in Lagom'sjavadsl.PersistentEntity. For compatibility with Lagom'sjavadsl.PersistentEntityyou 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 theEntityTypeKeyand theentityIdwhen constructing apersistenceIdwithEntityTypeKey.persistenceIdFrom.The default
|separator is also used in Lagom'sscaladsl.PersistentEntitybut no separator is used in Lagom'sjavadsl.PersistentEntity. For compatibility with Lagom'sjavadsl.PersistentEntityyou should use""as the separator here.- Parameters:
separator- (undocumented)- Returns:
- (undocumented)
-
-