Class ExtendedStartMsg

java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.ExtendedStartMsg

public final class ExtendedStartMsg extends ReplicationMsg
Added in protocol V10 to exchange additional information during handshake.

Updated in protocol V14 with heartbeat interval.

ASN.1 definition of the message is:

 ExtendedStartMsg ::= CHOICE {
      v10 PayloadV10 [APPLICATION 0]
      v14 PayloadV14 [APPLICATION 2]
 }

 PayloadV10 ::= SEQUENCE {
      serverId ::= CHOICE {
           replicaId           [0] IMPLICIT PrintableString
           replicationServerId [1] IMPLICIT PrintableString
      },
      groupId PrintableString,
      processId ::= SEQUENCE OF {
          msb INTEGER,
          lsb INTEGER
      },
      serverState ::= SET OF {
          csn OCTET STRING
      }
 }

 PayloadV14 ::= SEQUENCE {
      serverId ::= CHOICE {
           replicaId           [0] IMPLICIT PrintableString
           replicationServerId [1] IMPLICIT PrintableString
      },
      groupId PrintableString,
      processId ::= SEQUENCE OF {
          msb INTEGER,
          lsb INTEGER
      },
      serverState ::= SET OF {
          csn OCTET STRING
      },
      heartbeatInterval INTEGER
 }
 
  • Constructor Details

    • ExtendedStartMsg

      public ExtendedStartMsg(ServerId<?> serverId, com.forgerock.opendj.discovery.GroupId groupId, ProcessId processId, ServerState state, long heartbeatInterval)
      Constructs an ExtendedStartMsg replication message for sending.
      Parameters:
      serverId - the serverID to send
      groupId - the groupID to send
      processId - the processID to send
      state - the ServerState to send
      heartbeatInterval - the interval for RS-RS heartbeat
    • ExtendedStartMsg

      public ExtendedStartMsg(Asn1Reader asn1, byte messageType) throws IOException, DataFormatException
      Constructs a ExtendedStartMsg from a replication message.
      Parameters:
      asn1 - the data from a received message
      messageType - the type of received message
      Throws:
      IOException - if the message does not apply to this protocol version.
      DataFormatException - If the ASN.1 reader does not contain a valid encoded form of the message.
  • Method Details

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

      public com.forgerock.opendj.discovery.GroupId getGroupId()
      Returns the groupID in this message.
      Returns:
      the groupID in this message
    • getServerId

      public ServerId<?> getServerId()
      Returns the serverID in this message.
      Returns:
      the serverID in this message
    • getProcessId

      public ProcessId getProcessId()
      Returns the processID in this message.
      Returns:
      the processID in this message
    • getServerState

      public ServerState getServerState()
      Returns the ServerState in this message.
      Returns:
      the ServerState in this message
    • getHeartbeatInterval

      public long getHeartbeatInterval()
      Returns the heartbeat interval in this message, which is 0L by default.
      Returns:
      the heartbeat interval in this message, which is 0L by default.