public final class ServerDescriptor extends Object implements Comparable<ServerDescriptor>
It can represent either a DS-only, a RS-only or a combined DS-RS.
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ServerDescriptor o) |
Map<ADSContext.ServerProperty,Object> |
getAdsProperties()
Returns a Map containing the ADS properties of the server.
|
String |
getHostName()
Returns the host name of the server.
|
String |
getId()
Returns an Id that is unique for this server.
|
TopologyCacheException |
getLastException()
Returns the last exception that was encountered reading the configuration of the server.
|
HostPort |
getLdapHostPort()
Returns the HostPort to access this server using LDAP.
|
HostPort |
getLdapsHostPort()
Returns the HostPort to access this server using LDAPS.
|
Set<org.opends.server.tools.dsreplication.ReplicaDescriptor> |
getReplicas()
Returns the replicas.
|
HostPort |
getReplicationServerHostPort()
Returns the String representation of this replication server based on the information we have
("hostname":"replication port") and
null if this is not a replication server. |
ReplicationServerId |
getReplicationServerId()
Returns the replication server ID of this server.
|
int |
getReplicationServerPort()
Returns the replication port of this server and -1 if this is not a replication server.
|
String |
getSchemaReplicationID()
Returns the schema generation ID of the server.
|
static String |
getSuffixDisplay(Dn baseDN,
Set<ServerDescriptor> servers)
Returns a representation of a base DN for a set of servers.
|
boolean |
isRegistered()
Tells whether this server is registered in the ADS.
|
boolean |
isReplicationEnabled()
Tells whether replication is enabled on this server.
|
boolean |
isReplicationSecure()
Returns whether the communication with the replication port on the server is encrypted.
|
boolean |
isReplicationServer()
Tells whether this server is a replication server.
|
void |
setAdsProperties(Map<ADSContext.ServerProperty,Object> adsProperties)
Sets the ADS properties of the server.
|
void |
setLastException(TopologyCacheException lastException)
Sets the last exception that occurred while reading the configuration of the server.
|
void |
setReplicas(Set<org.opends.server.tools.dsreplication.ReplicaDescriptor> replicas)
Sets the replicas contained on the server.
|
String |
toString() |
public Set<org.opends.server.tools.dsreplication.ReplicaDescriptor> getReplicas()
public void setReplicas(Set<org.opends.server.tools.dsreplication.ReplicaDescriptor> replicas)
replicas
- the replicas contained on the server.public Map<ADSContext.ServerProperty,Object> getAdsProperties()
public boolean isRegistered()
true
if the server is registered in the ADS and false
otherwise.public boolean isReplicationServer()
true
if the server is a replication server and false
otherwise.public boolean isReplicationEnabled()
true
if replication is enabled and false
otherwise.public HostPort getReplicationServerHostPort()
null
if this is not a replication server.null
if this is not a replication server.public ReplicationServerId getReplicationServerId()
NO_REPLICATION_ID
if this is not a replication
server.public int getReplicationServerPort()
public boolean isReplicationSecure()
true
if the communication with the replication port on the server is encrypted and false
otherwise.public void setAdsProperties(Map<ADSContext.ServerProperty,Object> adsProperties)
adsProperties
- a Map containing the ADS properties of the server.public String getHostName()
public HostPort getLdapHostPort()
null
if the server is not configured to listen on
an LDAP port.public HostPort getLdapsHostPort()
null
if the server is not configured to listen on
an LDAPS port.public String getId()
public int compareTo(ServerDescriptor o)
compareTo
in interface Comparable<ServerDescriptor>
public String getSchemaReplicationID()
public TopologyCacheException getLastException()
public void setLastException(TopologyCacheException lastException)
lastException
- the last exception that occurred while reading the configuration of the server.public static String getSuffixDisplay(Dn baseDN, Set<ServerDescriptor> servers)
baseDN
- the base DN.servers
- the servers.Copyright 2010-2022 ForgeRock AS.