Package akka.persistence.typed
Class ReplicationId
- java.lang.Object
-
- akka.persistence.typed.ReplicationId
-
public final class ReplicationId extends java.lang.Objectparam: 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, unless the replicaId isReplicaId.empty
-
-
Constructor Summary
Constructors Constructor Description ReplicationId(java.lang.String typeName, java.lang.String entityId, ReplicaId replicaId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReplicationIdapply(java.lang.String typeName, java.lang.String entityId, ReplicaId replicaId)java.lang.StringentityId()static ReplicationIdfromString(java.lang.String id)static booleanisReplicationId(java.lang.String id)PersistenceIdpersistenceId()ReplicaIdreplicaId()java.lang.StringtoString()java.lang.StringtypeName()ReplicationIdwithReplica(ReplicaId newReplica)
-
-
-
Constructor Detail
-
ReplicationId
public ReplicationId(java.lang.String typeName, java.lang.String entityId, ReplicaId replicaId)
-
-
Method Detail
-
fromString
public static ReplicationId fromString(java.lang.String id)
-
isReplicationId
public static boolean isReplicationId(java.lang.String id)
-
apply
public static ReplicationId apply(java.lang.String typeName, java.lang.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 entitiesentityId- The unique entity idreplicaId- The unique identity for this entity. The underlying persistence id will include the replica, unless the replicaId isReplicaId.empty
-
typeName
public java.lang.String typeName()
-
entityId
public java.lang.String entityId()
-
replicaId
public ReplicaId replicaId()
-
persistenceId
public PersistenceId persistenceId()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
withReplica
public ReplicationId withReplica(ReplicaId newReplica)
-
-