Class ExtendedStartMsg
java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.ExtendedStartMsg
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
MSG_TYPE_DISK_ENCODING -
Constructor Summary
ConstructorsConstructorDescriptionExtendedStartMsg(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
Modifier and TypeMethodDescriptionbyte[]getBytes(short protocolVersion) Serializes the PDU using the provided replication protocol version.com.forgerock.opendj.discovery.GroupIdReturns the groupID in this message.longReturns the heartbeat interval in this message, which is 0L by default.Returns the processID in this message.ServerId<?>Returns the serverID in this message.Returns the ServerState in this message.Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
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 sendgroupId- the groupID to sendprocessId- the processID to sendstate- the ServerState to sendheartbeatInterval- the interval for RS-RS heartbeat
-
ExtendedStartMsg
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 Details
-
getBytes
public byte[] getBytes(short protocolVersion) Description copied from class:ReplicationMsgSerializes 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:
getBytesin 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
nullif 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
Returns the serverID in this message.- Returns:
- the serverID in this message
-
getProcessId
Returns the processID in this message.- Returns:
- the processID in this message
-
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.
-