From 8b1a3529580def922b2188a998fdebb65c756de0 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 27 Jan 2015 09:27:30 +0000
Subject: [PATCH] OPENDJ-1716 Various PluggableBackend/Storage refactorings Code review: Nicolas Capponi
---
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/spi/UpdateFunction.java | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/spi/UpdateFunction.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/spi/UpdateFunction.java
index 79e8b16..c0de3dd 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/spi/UpdateFunction.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/spi/UpdateFunction.java
@@ -21,12 +21,16 @@
* CDDL HEADER END
*
*
- * Copyright 2014 ForgeRock AS
+ * Copyright 2014-2015 ForgeRock AS
*/
package org.opends.server.backends.pluggable.spi;
import org.forgerock.opendj.ldap.ByteSequence;
+/**
+ * Function that computes the new value of a record for a Read-Modify-Write operation inside a transaction.
+ */
+// @FunctionalInterface
public interface UpdateFunction {
/**
* Computes the new value for a record based on the record's existing
@@ -35,8 +39,8 @@
* @param oldValue
* The record's existing content, or {@code null} if the record
* does not exist at the moment and is about to be created.
- * @return The new value for the record, or {@code null} if the record
- * should be completely removed.
+ * @return The new value for the record (which may be {@code null} if the record should be removed),
+ * or the old value if no update is required.
*/
ByteSequence computeNewValue(ByteSequence oldValue);
}
--
Gitblit v1.10.0