Class InitializeTargetMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.RoutableMsg
-
- org.opends.server.replication.protocol.InitializeTargetMsg
-
public class InitializeTargetMsg extends RoutableMsg
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.RoutableMsg
ALL_SERVERS, destination, senderID, THE_CLOSEST_SERVER, UNKNOWN_SERVER
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description InitializeTargetMsg(DN baseDN, int serverID, int destination, int requestorID, long entryCount, int initWindow)Creates a InitializeTargetMsg.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DNgetBaseDN()Get the base DN of the domain.byte[]getBytes(short version)Serializes the PDU using the provided replication protocol version.longgetEntryCount()Get the number of entries expected to be sent during the export.longgetInitiatorID()Get the serverID of the server that initiated the export.intgetInitWindow()Get the initializationWindow.voidsetInitWindow(int initWindow)Set the initWindow value.-
Methods inherited from class org.opends.server.replication.protocol.RoutableMsg
getDestination, getSenderID, toString
-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
Constructor Detail
-
InitializeTargetMsg
public InitializeTargetMsg(DN baseDN, int serverID, int destination, int requestorID, long entryCount, int initWindow)
Creates a InitializeTargetMsg.- Parameters:
baseDN- The base DN for which the InitializeMessage is created.serverID- The serverID 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 Detail
-
getEntryCount
public long getEntryCount()
Get the number of entries expected to be sent during the export.- Returns:
- the entry count
-
getInitiatorID
public long getInitiatorID()
Get the serverID 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 serverID
-
getBaseDN
public DN 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)
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:
getBytesin 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
nullif the message isn't supported in that protocol version.
-
setInitWindow
public void setInitWindow(int initWindow)
Set the initWindow value.- Parameters:
initWindow- The initialization window.
-
-