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 }
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
COMPACT_MASK, COMPACT_TYPE_ADD, COMPACT_TYPE_DELETE, COMPACT_TYPE_MODIFY, COMPACT_TYPE_MODIFY_DN, COMPACT_TYPE_REPLICA_OFFLINE, MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description ExtendedStartMsg(Asn1Reader asn1, byte messageType)
Constructs a ExtendedStartMsg from a replication message.ExtendedStartMsg(ServerId<?> serverId, com.forgerock.opendj.discovery.GroupId groupId, ProcessId processId, ServerState state, long heartbeatInterval)
Constructs an ExtendedStartMsg replication message for sending.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getBytes(short protocolVersion)
Serializes the PDU using the provided replication protocol version.com.forgerock.opendj.discovery.GroupId
getGroupId()
Returns the groupID in this message.long
getHeartbeatInterval()
Returns the heartbeat interval in this message, which is 0L by default.ProcessId
getProcessId()
Returns the processID in this message.ServerId<?>
getServerId()
Returns the serverID in this message.ServerState
getServerState()
Returns the ServerState in this message.-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
-
-
-
Constructor Detail
-
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 sendgroupId
- the groupID to sendprocessId
- the processID to sendstate
- the ServerState to sendheartbeatInterval
- 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 messagemessageType
- 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 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 classReplicationMsg
- 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.
-
-