Class ServerStartMsg


  • public class ServerStartMsg
    extends StartMsg
    This message is used by LDAP server when they first connect. to a replication server to let them know who they are and what is their state (their RUV)
    • Constructor Detail

      • ServerStartMsg

        public ServerStartMsg​(int serverId2,
                              String serverURL,
                              DN baseDN,
                              int windowSize,
                              long heartbeatInterval,
                              ServerState serverState,
                              long generationId,
                              boolean sslEncryption,
                              byte groupId)
        Creates a new ServerStartMsg. This message is to be sent by an LDAP Server after being connected to a replication server for a given replication domain.
        Parameters:
        serverId2 - The serverId of the server for which the ServerStartMsg is created.
        serverURL - directory server URL
        baseDN - The base DN.
        windowSize - The window size used by this server.
        heartbeatInterval - The requested heartbeat interval.
        serverState - The state of this server.
        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 DS for this DN
    • Method Detail

      • getServerId

        public int getServerId()
        Get the ServerID from the message.
        Returns:
        the server ID
      • getServerURL

        public String getServerURL()
        Get the Server URL from the message.
        Returns:
        the server URL
      • getBaseDN

        public DN getBaseDN()
        Get the baseDN.
        Returns:
        Returns the baseDN.
      • getMaxReceiveDelay

        public int getMaxReceiveDelay()
        Get the maxReceiveDelay.
        Returns:
        Returns the maxReceiveDelay.
      • getMaxReceiveQueue

        public int getMaxReceiveQueue()
        Get the maxReceiveQueue.
        Returns:
        Returns the maxReceiveQueue.
      • getMaxSendDelay

        public int getMaxSendDelay()
        Get the maxSendDelay.
        Returns:
        Returns the maxSendDelay.
      • getMaxSendQueue

        public int getMaxSendQueue()
        Get the maxSendQueue.
        Returns:
        Returns the maxSendQueue.
      • getServerState

        public ServerState getServerState()
        Get the ServerState.
        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:
        getBytes in class ReplicationMsg
        Parameters:
        protocolVersion - The protocol version to use for serialization. The version should normally be older than the current one.
        Returns:
        The encoded PDU, or null if the message isn't supported in that protocol version.
      • getWindowSize

        public int getWindowSize()
        Get the window size for the ldap server that created the message.
        Returns:
        The window size for the ldap server that created the message.
      • getHeartbeatInterval

        public long getHeartbeatInterval()
        Get the heartbeat interval requested by the ldap server that created the message.
        Returns:
        The heartbeat interval requested by the ldap server that created the message.
      • getSSLEncryption

        public boolean getSSLEncryption()
        Get the SSL encryption value for the ldap server that created the message.
        Returns:
        The SSL encryption value for the ldap server that created the message.