Class StartSessionMsg


  • public 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,
                               Collection<String> referralsURLs,
                               boolean assuredFlag,
                               AssuredMode assuredMode,
                               byte safeDataLevel)
        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
        assuredFlag - If assured mode is enabled or not
        assuredMode - Assured type
        safeDataLevel - Assured mode safe data level
    • Method Detail

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

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

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

        public boolean isAssured()
        Returns true if assured mode is enabled.
        Returns:
        true if assured mode is enabled.
      • getAssuredMode

        public AssuredMode getAssuredMode()
        Get the assured mode.
        Returns:
        the assured mode.
      • getSafeDataLevel

        public byte getSafeDataLevel()
        Get the safe data level.
        Returns:
        the safe data level.
      • 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.