Class ReplServerStartMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.StartMsg
-
- org.opends.server.replication.protocol.ReplServerStartMsg
-
public class ReplServerStartMsg extends StartMsg
Message sent by a replication server to another replication server at Startup.
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.StartMsg
generationId, groupId, protocolVersion
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description ReplServerStartMsg(int serverId, String serverURL, DN baseDN, int windowSize, ServerState serverState, long generationId, boolean sslEncryption, byte groupId, int degradedStatusThreshold)Create a ReplServerStartMsg.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DNgetBaseDN()Get the base DN from this ReplServerStartMsg.byte[]getBytes(short protocolVersion)Serializes the PDU using the provided replication protocol version.intgetDegradedStatusThreshold()Get the degraded status threshold value.intgetServerId()Get the Server Id.ServerStategetServerState()Get the serverState.StringgetServerURL()Get the server URL.booleangetSSLEncryption()Get the SSL encryption value for the server that created the message.intgetWindowSize()Get the window size for the server that created this message.voidsetDegradedStatusThreshold(int degradedStatusThreshold)Set the degraded status threshold (For test purpose).StringtoString()-
Methods inherited from class org.opends.server.replication.protocol.StartMsg
getGenerationId, getGroupId, getVersion, setGroupId
-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
Constructor Detail
-
ReplServerStartMsg
public ReplServerStartMsg(int serverId, String serverURL, DN baseDN, int windowSize, ServerState serverState, long generationId, boolean sslEncryption, byte groupId, int degradedStatusThreshold)Create a ReplServerStartMsg.- Parameters:
serverId- replication server idserverURL- replication server URLbaseDN- base DN for which the ReplServerStartMsg is created.windowSize- The window size.serverState- our ServerState for this baseDN.generationId- The generationId for this server.sslEncryption- Whether to continue using SSL to encrypt messages after the start messages have been exchanged.groupId- The group id of the RSdegradedStatusThreshold- The degraded status threshold
-
-
Method Detail
-
getServerId
public int getServerId()
Get the Server Id.- Returns:
- the server id
-
getServerURL
public String getServerURL()
Get the server URL.- Returns:
- the server URL
-
getBaseDN
public DN getBaseDN()
Get the base DN from this ReplServerStartMsg.- Returns:
- the base DN from this ReplServerStartMsg.
-
getServerState
public ServerState getServerState()
Get the serverState.- Returns:
- Returns the serverState.
-
getBytes
public byte[] getBytes(short protocolVersion)
Serializes the PDU using the provided replication protocol version. WARNING: should be overwritten by a PDU (sub class) we want to support older protocol version serialization for.- Specified by:
getBytesin classReplicationMsg- Parameters:
protocolVersion- The protocol version to use for serialization. The version should normally be older than the current one.- Returns:
- The encoded PDU, or
nullif the message isn't supported in that protocol version.
-
getWindowSize
public int getWindowSize()
Get the window size for the server that created this message.- Returns:
- The window size for the server that created this message.
-
getSSLEncryption
public boolean getSSLEncryption()
Get the SSL encryption value for the server that created the message.- Returns:
- The SSL encryption value for the server that created the message.
-
getDegradedStatusThreshold
public int getDegradedStatusThreshold()
Get the degraded status threshold value.- Returns:
- The degraded status threshold value.
-
setDegradedStatusThreshold
public void setDegradedStatusThreshold(int degradedStatusThreshold)
Set the degraded status threshold (For test purpose).- Parameters:
degradedStatusThreshold- The degraded status threshold to set.
-
-