Class InitializeTargetMsg


  • public final class InitializeTargetMsg
    extends InitializationMsg
    This message is part of the replication protocol. This message is sent by a server to one or several servers as the first message of an export, before sending the entries.
    • Constructor Detail

      • InitializeTargetMsg

        public InitializeTargetMsg​(Dn baseDN,
                                   ReplicaId replicaId,
                                   ReplicaId destination,
                                   ReplicaId requestorID,
                                   long entryCount,
                                   int initWindow)
        Creates a InitializeTargetMsg.
        Parameters:
        baseDN - The base DN for which the InitializeMessage is created.
        replicaId - The replicaId of the server that sends this message.
        destination - The destination of this message.
        requestorID - The server that initiates this export.
        entryCount - The count of entries that will be sent.
        initWindow - the initialization window.
    • Method Detail

      • getEntryCount

        public long getEntryCount()
        Get the number of entries expected to be sent during the export.
        Returns:
        the entry count
      • getInitiatorID

        public ReplicaId getInitiatorID()
        Get the replica id of the server that initiated the export. Roughly it is the server running the task:
        • the importer for the Initialize task,
        • the exporter for the InitializeRemote task.
        Returns:
        the replica id
      • getBaseDN

        public Dn getBaseDN()
        Get the base DN of the domain.
        Returns:
        the base DN
      • getInitWindow

        public int getInitWindow()
        Get the initializationWindow.
        Returns:
        the initialization window.
      • getBytes

        public byte[] getBytes​(short version)
        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:
        version - 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.
      • setInitWindow

        public void setInitWindow​(int initWindow)
        Set the initWindow value.
        Parameters:
        initWindow - The initialization window.