Class LDAPUpdateMsg

    • Constructor Detail

      • LDAPUpdateMsg

        protected LDAPUpdateMsg()
        Creates a new UpdateMsg.
    • Method Detail

      • generateMsg

        public static LDAPUpdateMsg generateMsg​(PostOperationOperation op)
        Generates an Update message with the provided information.
        Parameters:
        op - The operation for which the message must be created.
        Returns:
        The generated message.
      • getDN

        public Dn getDN()
        Get the DN on which the operation happened.
        Returns:
        The DN on which the operations happened.
      • setDN

        public void setDN​(Dn dn)
        Set the DN.
        Parameters:
        dn - The dn that must now be used for this message.
      • getEntryUUID

        public UUID getEntryUUID()
        Get the entryUUID of the entry on which the operation happened.
        Returns:
        The entryUUID of the entry on which the operation happened.
      • createRequest

        public ChangeRecord createRequest()
                                   throws IOException
        Create a request from this message.
        Returns:
        the created request
        Throws:
        LdapException - In case of LDAP decoding exception.
        IOException - In case of ASN1 decoding exception.
      • createRequest

        public abstract ChangeRecord createRequest​(Dn newDN)
                                            throws IOException
        Create a request from this message using the provided DN.
        Parameters:
        newDN - the DN to use when creating the request.
        Returns:
        the created request
        Throws:
        LdapException - In case of LDAP decoding exception
        IOException - In case of ASN1 decoding exception
      • appendEclIncludes

        public void appendEclIncludes​(ByteStringBuilder builder)
        Appends the encoded attributes to the provided builder.
        Parameters:
        builder - The ByteStringBuilder where the encoded attributes will be appended.
      • 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 UpdateMsg
        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.
      • getBytesV1

        protected abstract byte[] getBytesV1()
        Get the byte array representation of this message.

        This uses the version 1 of the replication protocol (used for compatibility).

        Returns:
        The byte array representation of this message.
      • getBytesV23

        protected abstract byte[] getBytesV23()
        Get the byte array representation of this message.

        This uses the version 2 of the replication protocol (used for compatibility).

        Returns:
        The byte array representation of this message.
      • getBytesV4ToLatest

        protected abstract byte[] getBytesV4ToLatest​(short protocolVersion)
        Get the byte array representation of this message.

        This uses the provided version number which must be at least version 4.

        Parameters:
        protocolVersion - the actual protocol version to encode into
        Returns:
        The byte array representation of this Message.
      • size

        public abstract int size()
        Description copied from class: UpdateMsg
        Return the number of bytes used by this message.
        Specified by:
        size in class UpdateMsg
        Returns:
        The number of bytes used by this message.
      • setEclIncludes

        public void setEclIncludes​(Collection<Attribute> entryAttrs)
        Set a provided list of entry attributes.
        Parameters:
        entryAttrs - The provided list of entry attributes.
      • getEclIncludes

        public List<Attribute> getEclIncludes()
        Returns the list of entry attributes.
        Returns:
        The list of entry attributes.