Class ServerStartMsg


  • public final 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​(ReplicaId replicaId,
                              com.forgerock.opendj.util.HostPort hostPort,
                              Dn baseDN,
                              long heartbeatInterval,
                              ServerState serverState,
                              long generationId,
                              boolean sslEncryption,
                              com.forgerock.opendj.discovery.GroupId 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:
        replicaId - The replicaId of the server for which the ServerStartMsg is created.
        hostPort - directory server host port
        baseDN - The base DN.
        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

      • getReplicaId

        public ReplicaId getReplicaId()
        Get the replica ID from the message.
        Returns:
        the replica ID
      • getHostPort

        public com.forgerock.opendj.util.HostPort getHostPort()
        Get the server host port from the message.
        Returns:
        the server host port
      • getBaseDN

        public Dn getBaseDN()
        Get the baseDN.
        Returns:
        Returns the baseDN.
      • getServerState

        public ServerState getServerState()
        Get the ServerState.
        Returns:
        The ServerState.
      • getBytes

        public byte[] getBytes​(short protocolVersion)
        Description copied from class: ReplicationMsg
        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.
      • 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.