Interface ServerId<T extends ServerId<T>>

Type Parameters:
T - The type of server ID
All Superinterfaces:
Comparable<T>
All Known Implementing Classes:
ReplicaId, ReplicationServerId

public sealed interface ServerId<T extends ServerId<T>> extends Comparable<T> permits ReplicaId, ReplicationServerId
Represents a server ID, which can identify either a directory server or a replication server.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns if the serverId can be used as identifier with replication protocol versions before V11.
    static boolean
    Checks if the provided name represents a numeric value for a server id.
    Returns the normalized name of this serverId.
    int
    Returns the numeric value of this serverId, as an int.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • numericId

      int numericId()
      Returns the numeric value of this serverId, as an int.

      The numeric value is used in the CSNs.

      Returns:
      this serverId as an int value
    • isNumericId

      static boolean isNumericId(String name)
      Checks if the provided name represents a numeric value for a server id.

      Only integers up to five digits are considered acceptable.

      Parameters:
      name - the server id
      Returns:
      true if the provided name represent an integer value for the server id
    • normalizedName

      String normalizedName()
      Returns the normalized name of this serverId.
      Returns:
      this serverId as a (normalized) String value
    • isBackwardCompatibleWithNumericId

      boolean isBackwardCompatibleWithNumericId()
      Returns if the serverId can be used as identifier with replication protocol versions before V11.
      Returns:
      if the serverId can be used as identifier with replication protocol versions before V11