From f73b655466092169abac34833fb628fce1fcdebe Mon Sep 17 00:00:00 2001
From: jcduff <jcduff@localhost>
Date: Thu, 23 Oct 2008 14:04:24 +0000
Subject: [PATCH] The commit will bring the following features : - An updated version of the underlying database. BDB JE 3.3 is now used. - Attribute API refactoring providing a better abstraction and offering improved performances. - A new GUI called the Control-Panel to replace the Status-Panel: the specifications for this GUI are available on OpenDS Wiki and contains a link to a mockup. See <https://www.opends.org/wiki/page/ControlPanelUISpecification>. - Some changes in the replication protocol to implement "Assured Replication Mode". The specifications are on OpenDS Wiki at <https://www.opends.org/wiki/page/AssuredMode> and section 7 described some of the replication changes required to support this. Assured Replication is not finished, but the main replication protocol changes to support it are done. As explained by Gilles on an email on the Dev mailing list (http://markmail.org/message/46rgo3meq3vriy4a), with these changes the newer versions of OpenDS may not be able to replicate with OpenDS 1.0 instances. - Support for Service Tags on the platforms where the functionality is available and enabled. Specifications are published at <https://www.opends.org/wiki/page/OpenDSServiceTagEnabled>. For more information on Service Tags see <http://wikis.sun.com/display/ServiceTag/Sun+Service+Tag+FAQ>. - The Admin Connector service. In order to provide agentry of the OpenDS server at any time, a new service has been added, dedicated to the administration, configuration and monitoring of the server. An overview of the Admin Connector service and it's use is available on the OpenDS wiki <https://www.opends.org/wiki/page/ManagingAdministrationTrafficToTheServer> - Updates to the various command line tools to support the Admin Connector service. - Some internal re-architecting of the server to put the foundation of future developments such as virtual directory services. The new NetworkGroups and WorkFlow internal services which have been specified in <https://www.opends.org/wiki/page/BasicOperationRoutingThroughNetworkGroup> are now implemented. - Many bug fixes...
---
opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java | 51 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java b/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
index ef24139..fa8f1c3 100644
--- a/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/DeleteMsg.java
@@ -41,10 +41,8 @@
/**
* Object used when sending delete information to replication servers.
*/
-public class DeleteMsg extends UpdateMessage
+public class DeleteMsg extends UpdateMsg
{
- private static final long serialVersionUID = -4905520652801395185L;
-
/**
* Creates a new delete message.
*
@@ -73,14 +71,16 @@
* Creates a new Add message from a byte[].
*
* @param in The byte[] from which the operation must be read.
- * @throws DataFormatException The input byte[] is not a valid AddMsg
+ * @throws DataFormatException The input byte[] is not a valid DeleteMsg
* @throws UnsupportedEncodingException If UTF8 is not supported by the jvm
*/
public DeleteMsg(byte[] in) throws DataFormatException,
UnsupportedEncodingException
{
- super(in);
- decodeHeader(MSG_TYPE_DELETE_REQUEST, in);
+ byte[] allowedPduTypes = new byte[2];
+ allowedPduTypes[0] = MSG_TYPE_DELETE;
+ allowedPduTypes[1] = MSG_TYPE_DELETE_V1;
+ decodeHeader(allowedPduTypes, in);
}
@@ -101,17 +101,12 @@
}
/**
- * Get the byte array representation of this Message.
- *
- * @return The byte array representation of this Message.
- *
- * @throws UnsupportedEncodingException When the encoding of the message
- * failed because the UTF-8 encoding is not supported.
+ * {@inheritDoc}
*/
@Override
public byte[] getBytes() throws UnsupportedEncodingException
{
- return encodeHeader(MSG_TYPE_DELETE_REQUEST, 0);
+ return encodeHeader(MSG_TYPE_DELETE, 0);
}
/**
@@ -120,7 +115,27 @@
@Override
public String toString()
{
- return ("DEL " + getDn() + " " + getChangeNumber());
+ if (protocolVersion == ProtocolVersion.REPLICATION_PROTOCOL_V1)
+ {
+ return "DeleteMsg content: " +
+ "\nprotocolVersion: " + protocolVersion +
+ "\ndn: " + dn +
+ "\nchangeNumber: " + changeNumber +
+ "\nuniqueId: " + uniqueId +
+ "\nassuredFlag: " + assuredFlag;
+ }
+ if (protocolVersion == ProtocolVersion.REPLICATION_PROTOCOL_V2)
+ {
+ return "DeleteMsg content: " +
+ "\nprotocolVersion: " + protocolVersion +
+ "\ndn: " + dn +
+ "\nchangeNumber: " + changeNumber +
+ "\nuniqueId: " + uniqueId +
+ "\nassuredFlag: " + assuredFlag +
+ "\nassuredMode: " + assuredMode +
+ "\nsafeDataLevel: " + safeDataLevel;
+ }
+ return "!!! Unknown version: " + protocolVersion + "!!!";
}
/**
@@ -133,4 +148,12 @@
// grow very large. It is therefore safe to assume an average of 40 bytes.
return 40;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] getBytes_V1() throws UnsupportedEncodingException
+ {
+ return encodeHeader_V1(MSG_TYPE_DELETE_V1, 0);
+ }
}
--
Gitblit v1.10.0