object PersistenceId
- Source
- PersistenceId.scala
- Alphabetic
- By Inheritance
- PersistenceId
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val DefaultSeparator: String
Default separator character used for concatenating a
typeHint
withentityId
to construct unique persistenceId.Default separator character used for concatenating a
typeHint
withentityId
to construct unique persistenceId. This must be same as in Lagom'sscaladsl.PersistentEntity
, for compatibility. No separator is used in Lagom'sjavadsl.PersistentEntity
so for compatibility with that the""
separator must be used instead. - def apply(entityTypeHint: String, entityId: String, separator: String): PersistenceId
Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with theseparator
.Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with theseparator
.Cluster Sharding is often used together with
EventSourcedBehavior
for the entities. ThePersistenceId
of theEventSourcedBehavior
can typically be constructed with:PersistenceId(entityContext.entityTypeKey.name, entityContext.entityId)
That format of the
PersistenceId
is not mandatory and only provided as a convenience of a "standardized" format.The default separator
|
is used by theapply
that doesn't take aseparator
parameter.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.- Exceptions thrown
IllegalArgumentException
if theentityTypeHint
orentityId
containsseparator
- def apply(entityTypeHint: String, entityId: String): PersistenceId
Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with|
separator.Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with|
separator.Cluster Sharding is often used together with
EventSourcedBehavior
for the entities. ThePersistenceId
of theEventSourcedBehavior
can typically be constructed with:PersistenceId(entityContext.entityTypeKey.name, entityContext.entityId)
That format of the
PersistenceId
is not mandatory and only provided as a convenience of a "standardized" format.Another separator can be defined by using the
apply
that takes aseparator
parameter.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.- Exceptions thrown
IllegalArgumentException
if theentityTypeHint
orentityId
contains|
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def concat(entityTypeHint: String, entityId: String, separator: String): String
Constructs a persistence id
String
from the givenentityTypeHint
andentityId
by concatenating them with theseparator
.Constructs a persistence id
String
from the givenentityTypeHint
andentityId
by concatenating them with theseparator
.- Exceptions thrown
IllegalArgumentException
if theentityTypeHint
orentityId
containsseparator
- def concat(entityTypeHint: String, entityId: String): String
Constructs a persistence id
String
from the givenentityTypeHint
andentityId
by concatenating them with|
separator.Constructs a persistence id
String
from the givenentityTypeHint
andentityId
by concatenating them with|
separator.- Exceptions thrown
IllegalArgumentException
if theentityTypeHint
orentityId
contains|
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extractEntityId(id: String): String
Extract the
entityId
from a persistence id String with the default separator|
.Extract the
entityId
from a persistence id String with the default separator|
. If the separator|
is not found it return theid
. - def extractEntityType(id: String): String
Extract the
entityTypeHint
from a persistence id String with the default separator|
.Extract the
entityTypeHint
from a persistence id String with the default separator|
. If the separator|
is not found it return the empty String (""
). - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def of(entityTypeHint: String, entityId: String, separator: String): PersistenceId
Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with theseparator
.Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with theseparator
.Cluster Sharding is often used together with
EventSourcedBehavior
for the entities. ThePersistenceId
of theEventSourcedBehavior
can typically be constructed with:PersistenceId.of(entityContext.getEntityTypeKey().name(), entityContext.getEntityId())
That format of the
PersistenceId
is not mandatory and only provided as a convenience of a "standardized" format.The default separator
|
is used by theapply
that doesn't take aseparator
parameter.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.- Exceptions thrown
IllegalArgumentException
if theentityTypeHint
orentityId
containsseparator
- def of(entityTypeHint: String, entityId: String): PersistenceId
Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with|
separator.Constructs a PersistenceId from the given
entityTypeHint
andentityId
by concatenating them with|
separator.Cluster Sharding is often used together with
EventSourcedBehavior
for the entities. ThePersistenceId
of theEventSourcedBehavior
can typically be constructed with:PersistenceId.of(entityContext.getEntityTypeKey().name(), entityContext.getEntityId())
That format of the
PersistenceId
is not mandatory and only provided as a convenience of a "standardized" format.Another separator can be defined by using the
PersistenceId.of
that takes aseparator
parameter.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.- Exceptions thrown
IllegalArgumentException
if theentityTypeHint
orentityId
contains|
- def ofUniqueId(id: String): PersistenceId
Constructs a PersistenceId with
id
as the full unique identifier. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(persistenceId: PersistenceId): Option[(String, String)]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])