Class DSInfo
- java.lang.Object
-
- org.opends.server.replication.common.DSInfo
-
@Immutable public final class DSInfo extends Object
This class holds information about a DS connected to the topology. This information is to be exchanged through the replication protocol in topology messages, to keep every member (RS or DS) of the topology aware of the DS topology.
-
-
Constructor Summary
Constructors Constructor Description DSInfo(int dsId, String dsUrl, int rsId, long generationId, ServerStatus status, boolean assuredFlag, AssuredMode assuredMode, byte safeDataLevel, byte groupId, Collection<String> refUrls, Collection<String> eclIncludes, Collection<String> eclIncludesForDeletes, short protocolVersion)Creates a new instance of DSInfo with every given info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DSInfocloneWithReplicationServerId(int rsId)Returns a new instance ofDSInfowith the specified replication server Id.booleanequals(Object obj)Test if the passed object is equal to this one.AssuredModegetAssuredMode()Get the DS assured mode (relevant if DS has assured replication enabled).intgetDsId()Get the DS id.StringgetDsUrl()Get the DS URL.Set<String>getEclIncludes()Get the entry attributes to be included in the ECL.Set<String>getEclIncludesForDeletes()Get the entry attributes to be included in the ECL for delete operations.longgetGenerationId()Get the generation id DS is using.bytegetGroupId()Get the DS group id.shortgetProtocolVersion()Get the protocol version supported by this server.List<String>getRefUrls()Get the DS exported URLs for referrals.intgetRsId()Get the RS id the DS is connected to.bytegetSafeDataLevel()Get the DS safe data level (relevant if assured mode is safe data).ServerStatusgetStatus()Get the DS status.inthashCode()Computes hash code for this object instance.booleanisAssured()Tells if the DS has assured replication enabled.StringtoString()Returns a string representation of the DS info.
-
-
-
Constructor Detail
-
DSInfo
public DSInfo(int dsId, String dsUrl, int rsId, long generationId, ServerStatus status, boolean assuredFlag, AssuredMode assuredMode, byte safeDataLevel, byte groupId, Collection<String> refUrls, Collection<String> eclIncludes, Collection<String> eclIncludesForDeletes, short protocolVersion)Creates a new instance of DSInfo with every given info.- Parameters:
dsId- The DS iddsUrl- Url of the DSrsId- The RS id the DS is connected togenerationId- The generation id the DS is usingstatus- The DS statusassuredFlag- DS assured replication enabled or notassuredMode- DS assured modesafeDataLevel- DS safe data levelgroupId- DS group idrefUrls- DS exported referrals URLseclIncludes- The list of entry attributes to include in the ECL.eclIncludesForDeletes- The list of entry attributes to include in the ECL for deletes.protocolVersion- Protocol version supported by this server.
-
-
Method Detail
-
getDsId
public int getDsId()
Get the DS id.- Returns:
- the DS id
-
getDsUrl
public String getDsUrl()
Get the DS URL.- Returns:
- the DS URL
-
getRsId
public int getRsId()
Get the RS id the DS is connected to.- Returns:
- the RS id the DS is connected to
-
getGenerationId
public long getGenerationId()
Get the generation id DS is using.- Returns:
- the generation id DS is using.
-
getStatus
public ServerStatus getStatus()
Get the DS status.- Returns:
- the DS status
-
isAssured
public boolean isAssured()
Tells if the DS has assured replication enabled.- Returns:
- True if the DS has assured replication enabled
-
getAssuredMode
public AssuredMode getAssuredMode()
Get the DS assured mode (relevant if DS has assured replication enabled).- Returns:
- The DS assured mode
-
getSafeDataLevel
public byte getSafeDataLevel()
Get the DS safe data level (relevant if assured mode is safe data).- Returns:
- The DS safe data level
-
getGroupId
public byte getGroupId()
Get the DS group id.- Returns:
- The DS group id
-
getRefUrls
public List<String> getRefUrls()
Get the DS exported URLs for referrals.- Returns:
- The DS exported URLs for referrals
-
getEclIncludes
public Set<String> getEclIncludes()
Get the entry attributes to be included in the ECL.- Returns:
- The entry attributes to be included in the ECL.
-
getEclIncludesForDeletes
public Set<String> getEclIncludesForDeletes()
Get the entry attributes to be included in the ECL for delete operations.- Returns:
- The entry attributes to be included in the ECL.
-
getProtocolVersion
public short getProtocolVersion()
Get the protocol version supported by this server. Returns -1 when the protocol version is not known (too old version).- Returns:
- The protocol version.
-
cloneWithReplicationServerId
public DSInfo cloneWithReplicationServerId(int rsId)
Returns a new instance ofDSInfowith the specified replication server Id.- Parameters:
rsId- the replication server Id to set on the new DSInfo object.- Returns:
- a new instance of
DSInfowith the specified replication server Id.
-
equals
public boolean equals(Object obj)
Test if the passed object is equal to this one.
-
hashCode
public int hashCode()
Computes hash code for this object instance.
-
-