Class InitializeTargetMsg
java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.InitializationMsg
org.opends.server.replication.protocol.InitializeTargetMsg
This message is part of the replication protocol. This message is sent by a server to one or several servers as the
first message of an export, before sending the entries.
-
Field Summary
Fields inherited from class org.opends.server.replication.protocol.InitializationMsg
destination, senderId
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
ConstructorDescriptionInitializeTargetMsg
(Dn baseDN, ReplicaId replicaId, ReplicaId destination, ReplicaId requestorID, long entryCount, int initWindow) Creates a InitializeTargetMsg. -
Method Summary
Modifier and TypeMethodDescriptionGet the base DN of the domain.byte[]
getBytes
(short version) Serializes the PDU using the provided replication protocol version.long
Get the number of entries expected to be sent during the export.Get the replica id of the server that initiated the export.int
Get the initializationWindow.Get the server ID of the server that sent this message.void
setInitWindow
(int initWindow) Set the initWindow value.Methods inherited from class org.opends.server.replication.protocol.InitializationMsg
getDestination, toString
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
Constructor Details
-
InitializeTargetMsg
public InitializeTargetMsg(Dn baseDN, ReplicaId replicaId, ReplicaId destination, ReplicaId requestorID, long entryCount, int initWindow) Creates a InitializeTargetMsg.- Parameters:
baseDN
- The base DN for which the InitializeMessage is created.replicaId
- The replicaId of the server that sends this message.destination
- The destination of this message.requestorID
- The server that initiates this export.entryCount
- The count of entries that will be sent.initWindow
- the initialization window.
-
-
Method Details
-
getEntryCount
public long getEntryCount()Get the number of entries expected to be sent during the export.- Returns:
- the entry count
-
getInitiatorID
Get the replica id of the server that initiated the export. Roughly it is the server running the task:- the importer for the Initialize task,
- the exporter for the InitializeRemote task.
- Returns:
- the replica id
-
getBaseDN
Get the base DN of the domain.- Returns:
- the base DN
-
getInitWindow
public int getInitWindow()Get the initializationWindow.- Returns:
- the initialization window.
-
getBytes
public byte[] getBytes(short version) 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:
version
- 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.
-
setInitWindow
public void setInitWindow(int initWindow) Set the initWindow value.- Parameters:
initWindow
- The initialization window.
-
getSenderID
Description copied from class:InitializationMsg
Get the server ID of the server that sent this message.- Overrides:
getSenderID
in classInitializationMsg
- Returns:
- the server id
-