Package akka.persistence.typed
Class ReplicationId
- java.lang.Object
-
- akka.persistence.typed.ReplicationId
-
public final class ReplicationId extends java.lang.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, 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 ReplicationId
apply(java.lang.String typeName, java.lang.String entityId, ReplicaId replicaId)
java.lang.String
entityId()
static ReplicationId
fromString(java.lang.String id)
static boolean
isReplicationId(java.lang.String id)
PersistenceId
persistenceId()
ReplicaId
replicaId()
java.lang.String
toString()
java.lang.String
typeName()
ReplicationId
withReplica(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:
toString
in classjava.lang.Object
-
withReplica
public ReplicationId withReplica(ReplicaId newReplica)
-
-