Class ReplicationServerId
java.lang.Object
org.opends.server.replication.common.ReplicationServerId
- All Implemented Interfaces:
Comparable<ReplicationServerId>
,ServerId<ReplicationServerId>
Represents the server ID for a replication server, called a Replication Server ID.
The Replication Server ID is represented both with a name and a numeric value:
- The name is a string, used for user interfaces (configuration, logs, monitoring, ...)
- The numeric value is a integer, it is needed only for compatibility with previous replication protocol versions and should be removed in the future. The integer should not be exposed in user interfaces.
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
static ReplicationServerId
fromLegacyNumericId
(int numericId) Generates a newReplicationServerId
from the provided integer value.static ReplicationServerId
Generates a newReplicationServerId
from the provided string value.int
hashCode()
boolean
Returns if the serverId can be used as identifier with replication protocol versions before V11.boolean
Tests whether this id corresponds to the null replication server id.Returns the normalized name of this serverId.static ReplicationServerId
Returns the special id corresponding to the null replication server id.int
Returns the numeric value of this serverId, as an int.toString()
-
Method Details
-
nullReplicationServerId
Returns the special id corresponding to the null replication server id.- Returns:
- the null replication server id
-
fromLegacyNumericId
Generates a newReplicationServerId
from the provided integer value.Replication Servers need an integer value only for protocol compatibility purposes, the method can be deleted once support for replication topologies running versions before 6.5.0 is dropped.
- Parameters:
numericId
- the numeric part of this ID- Returns:
- a new
ReplicationServerId
-
fromReplicationServerName
Generates a newReplicationServerId
from the provided string value.- Parameters:
name
- the name of this ID- Returns:
- a new
ReplicationServerId
-
normalizedName
Description copied from interface:ServerId
Returns the normalized name of this serverId.- Specified by:
normalizedName
in interfaceServerId<ReplicationServerId>
- Returns:
- this serverId as a (normalized)
String
value
-
numericId
public int numericId()Description copied from interface:ServerId
Returns the numeric value of this serverId, as an int.The numeric value is used in the CSNs.
- Specified by:
numericId
in interfaceServerId<ReplicationServerId>
- Returns:
- this serverId as an int value
-
isNullReplicationServerId
public boolean isNullReplicationServerId()Tests whether this id corresponds to the null replication server id.- Returns:
true
iff the id is the null replication server id.
-
isBackwardCompatibleWithNumericId
public boolean isBackwardCompatibleWithNumericId()Description copied from interface:ServerId
Returns if the serverId can be used as identifier with replication protocol versions before V11.- Specified by:
isBackwardCompatibleWithNumericId
in interfaceServerId<ReplicationServerId>
- Returns:
- if the serverId can be used as identifier with replication protocol versions before V11
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ReplicationServerId>
-
equals
-
toString
-
hashCode
public int hashCode()
-