From a565ac49f0bc0e9198a111ab6257956c105edbd5 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Mon, 9 Oct 2023 18:37:49 +0100 Subject: [PATCH] Remove note about Lagom (#698) (#699) * Remove note about Lagom * Update PersistenceId.scala --- docs/src/main/paradox/typed/persistence.md | 8 ------ .../persistence/typed/PersistenceId.scala | 26 +++---------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/docs/src/main/paradox/typed/persistence.md b/docs/src/main/paradox/typed/persistence.md index a3afe529eba..3a6fdfd57ff 100644 --- a/docs/src/main/paradox/typed/persistence.md +++ b/docs/src/main/paradox/typed/persistence.md @@ -119,14 +119,6 @@ to help with constructing such `PersistenceId` from an `entityTypeHint` and `ent The default separator when concatenating the `entityTypeHint` and `entityId` is `|`, but a custom separator is supported. -@@@ note - -The `|` separator is also used in Lagom's `scaladsl.PersistentEntity` but no separator is used -in Lagom's `javadsl.PersistentEntity`. For compatibility with Lagom's `javadsl.PersistentEntity` -you should use `""` as the separator. - -@@@ - A custom identifier can be created with @apidoc[PersistenceId.ofUniqueId](typed.PersistenceId$) {scala="#ofUniqueId(id:String):org.apache.pekko.persistence.typed.PersistenceId" java="#ofUniqueId(java.lang.String)"}. ### Command handler diff --git a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PersistenceId.scala b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PersistenceId.scala index 6b0113e8f85..8eb0a95d25c 100644 --- a/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PersistenceId.scala +++ b/persistence-typed/src/main/scala/org/apache/pekko/persistence/typed/PersistenceId.scala @@ -17,8 +17,6 @@ object PersistenceId { /** * Default separator character used for concatenating a `typeHint` with `entityId` to construct unique persistenceId. - * This must be same as in Lagom's `scaladsl.PersistentEntity`, for compatibility. No separator is used - * in Lagom's `javadsl.PersistentEntity` so for compatibility with that the `""` separator must be used instead. */ val DefaultSeparator = "|" @@ -37,11 +35,7 @@ object PersistenceId { * * Another separator can be defined by using the `apply` that takes a `separator` parameter. * - * The `|` separator is also used in Lagom's `scaladsl.PersistentEntity` but no separator is used - * in Lagom's `javadsl.PersistentEntity`. For compatibility with Lagom's `javadsl.PersistentEntity` - * you should use `""` as the separator. - * - * @throws IllegalArgumentException if the `entityTypeHint` or `entityId` contains `|` + * @throws java.lang.IllegalArgumentException if the `entityTypeHint` or `entityId` contains `|` */ def apply(entityTypeHint: String, entityId: String): PersistenceId = apply(entityTypeHint, entityId, DefaultSeparator) @@ -61,11 +55,7 @@ object PersistenceId { * * The default separator `|` is used by the `apply` that doesn't take a `separator` parameter. * - * The `|` separator is also used in Lagom's `scaladsl.PersistentEntity` but no separator is used - * in Lagom's `javadsl.PersistentEntity`. For compatibility with Lagom's `javadsl.PersistentEntity` - * you should use `""` as the separator. - * - * @throws IllegalArgumentException if the `entityTypeHint` or `entityId` contains `separator` + * @throws java.lang.IllegalArgumentException if the `entityTypeHint` or `entityId` contains `separator` */ def apply(entityTypeHint: String, entityId: String, separator: String): PersistenceId = { if (separator.nonEmpty) { @@ -95,11 +85,7 @@ object PersistenceId { * * Another separator can be defined by using the `PersistenceId.of` that takes a `separator` parameter. * - * The `|` separator is also used in Lagom's `scaladsl.PersistentEntity` but no separator is used - * in Lagom's `javadsl.PersistentEntity`. For compatibility with Lagom's `javadsl.PersistentEntity` - * you should use `""` as the separator. - * - * @throws IllegalArgumentException if the `entityTypeHint` or `entityId` contains `|` + * @throws java.lang.IllegalArgumentException if the `entityTypeHint` or `entityId` contains `|` */ def of(entityTypeHint: String, entityId: String): PersistenceId = apply(entityTypeHint, entityId) @@ -119,11 +105,7 @@ object PersistenceId { * * The default separator `|` is used by the `apply` that doesn't take a `separator` parameter. * - * The `|` separator is also used in Lagom's `scaladsl.PersistentEntity` but no separator is used - * in Lagom's `javadsl.PersistentEntity`. For compatibility with Lagom's `javadsl.PersistentEntity` - * you should use `""` as the separator. - * - * @throws IllegalArgumentException if the `entityTypeHint` or `entityId` contains `separator` + * @throws java.lang.IllegalArgumentException if the `entityTypeHint` or `entityId` contains `separator` */ def of(entityTypeHint: String, entityId: String, separator: String): PersistenceId = apply(entityTypeHint, entityId, separator)