From bcf686add35bda4a6ac5c3d085abe151ea018e8e Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 14 Jan 2009 08:29:50 +0000
Subject: [PATCH]
---
opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
index c761af5..66624aa 100644
--- a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2008 Sun Microsystems, Inc.
+ * Copyright 2006-2009 Sun Microsystems, Inc.
*/
package org.opends.server.replication.protocol;
@@ -58,6 +58,11 @@
protected String uniqueId;
/**
+ * Encoded form of the LDAPUpdateMsg.
+ */
+ protected byte[] bytes = null;
+
+ /**
* Creates a new UpdateMsg.
*/
public LDAPUpdateMsg()
@@ -158,6 +163,20 @@
return uniqueId;
}
+ /**
+ * Do all the work necessary for the encoding.
+ *
+ * This is useful in case when one wants to perform this outside
+ * of a synchronized portion of code.
+ *
+ * This method is not synchronized and therefore not MT safe.
+ *
+ * @throws UnsupportedEncodingException when encoding fails.
+ */
+ public void encode() throws UnsupportedEncodingException
+ {
+ bytes = getBytes();
+ }
/**
* Create and Operation from the message.
--
Gitblit v1.10.0