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. - 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.- Exceptions thrown
java.lang.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.- Exceptions thrown
java.lang.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()
- 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.- Exceptions thrown
java.lang.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.- Exceptions thrown
java.lang.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])