Class StartSessionMsg


  • public final class StartSessionMsg
    extends ReplicationMsg
    This message is used by DS to confirm a RS he wants to connect to him (open a session).

    Handshake sequence between DS and RS is like this:

     
     DS --- ServerStartMsg ---> RS
     DS <--- ReplServerStartMsg --- RS
     DS --- StartSessionMsg ---> RS
     DS <--- TopologyMsg --- RS
     
     
    This message contains:
    • status: the status we are entering the topology with
    • referrals URLs: the referrals URLs we allow peer DSs to use to refer to our domain when needed
    • Constructor Detail

      • StartSessionMsg

        public StartSessionMsg​(ServerStatus status,
                               Set<String> referralsURLs)
        Creates a new message with the given required parameters.
        Parameters:
        status - Status we are starting with
        referralsURLs - Referrals URLs to be used by peer DSs
    • Method Detail

      • 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.
      • getReferralsURLs

        public Set<String> getReferralsURLs()
        Get the set of referrals URLs.
        Returns:
        The set of referrals URLs.
      • getStatus

        public ServerStatus getStatus()
        Get the status from this message.
        Returns:
        The status.
      • setEclIncludes

        public void setEclIncludes​(Set<String> includeAttributes,
                                   Set<String> includeAttributesForDeletes)
        Set the attributes configured on a server to be included in the ECL.
        Parameters:
        includeAttributes - attributes to be included with all change records.
        includeAttributesForDeletes - additional attributes to be included with delete change records.
      • getEclIncludes

        public Set<String> getEclIncludes()
        Get the attributes to include in each change for the ECL.
        Returns:
        The attributes to include in each change for the ECL.
      • getEclIncludesForDeletes

        public Set<String> getEclIncludesForDeletes()
        Get the attributes to include in each delete change for the ECL.
        Returns:
        The attributes to include in each delete change for the ECL.