Class ReplicationId

java.lang.Object
org.apache.pekko.persistence.typed.ReplicationId

public final class ReplicationId extends Object
param: typeName The name of the entity type e.g. account, user. Made part of the persistence id so that entity ids don't need to be unique across different replicated entities param: entityId The unique entity id param: replicaId The unique identity for this entity. The underlying persistence id will include the replica.
  • Constructor Details

  • Method Details

    • fromString

      public static ReplicationId fromString(String id)
    • isReplicationId

      public static boolean isReplicationId(String id)
    • apply

      public static ReplicationId apply(String typeName, String entityId, ReplicaId replicaId)
      Parameters:
      typeName - The name of the entity type e.g. account, user. Made part of the persistence id so that entity ids don't need to be unique across different replicated entities
      entityId - The unique entity id
      replicaId - The unique identity for this entity. The underlying persistence id will include the replica.
    • typeName

      public String typeName()
    • entityId

      public String entityId()
    • replicaId

      public ReplicaId replicaId()
    • persistenceId

      public PersistenceId persistenceId()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • withReplica

      public ReplicationId withReplica(ReplicaId newReplica)