public final class IntegerReplicationContext extends Object implements ReplicationContext
Constructor and Description |
---|
IntegerReplicationContext() |
Modifier and Type | Method and Description |
---|---|
ProcessId |
getLocalProcessId()
Returns the current process ID of this server.
|
ReplicaId |
getOrCreateReplicaId(int id)
Returns the replica ID corresponding to the provided integer.
|
ReplicaId |
getOrCreateReplicaId(String name)
Returns the replica ID corresponding to the provided name.
|
ReplicationServerId |
getOrCreateReplicationServerId(int id)
Returns the replication server ID corresponding to the provided integer.
|
ReplicationServerId |
getOrCreateReplicationServerId(String name)
Returns the replication server ID corresponding to the provided name.
|
ServerId<?> |
getServerId(int id)
Returns the replication server or replica ID corresponding to the provided integer.
|
public ProcessId getLocalProcessId()
ReplicationContext
The process ID is generated at each server start-up and is used to known if the RS or DS role of this local server is actually connected to the RS or DS role of this same local server.
The process ID is exchanged during the extended-handshake performed when a DS/RS is connecting to another DS/RS.
getLocalProcessId
in interface ReplicationContext
org.opends.server.replication.protocol.SessionImpl#performExtendedHandshake(GroupId)
public ReplicaId getOrCreateReplicaId(int id)
ReplicationContext
getOrCreateReplicaId
in interface ReplicationContext
id
- numeric id corresponding to a replicapublic ReplicationServerId getOrCreateReplicationServerId(int id)
ReplicationContext
getOrCreateReplicationServerId
in interface ReplicationContext
id
- numeric id corresponding to a replication serverpublic ReplicaId getOrCreateReplicaId(String name)
ReplicationContext
getOrCreateReplicaId
in interface ReplicationContext
name
- name corresponding to a replicapublic ReplicationServerId getOrCreateReplicationServerId(String name)
ReplicationContext
getOrCreateReplicationServerId
in interface ReplicationContext
name
- name corresponding to a replication serverpublic ServerId<?> getServerId(int id) throws NoSuchElementException
ReplicationContext
getServerId
in interface ReplicationContext
id
- The numeric id of a replication server or replicanull
if the numeric id does not correspond to an known server IDNoSuchElementException
- if the numeric id does not correspond to a known serverCopyright 2010-2022 ForgeRock AS.