Author: reschke
Date: Mon Dec 21 14:08:30 2015
New Revision: 1721160

URL: http://svn.apache.org/viewvc?rev=1721160&view=rev
Log:
OAK-3662: add bulk createOrUpdate method to the DocumentStore API

(applied tomekr's patch with minor Javadoc improvements)

Added:
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BulkCreateOrUpdateTest.java
   (with props)
Modified:
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/memory/MemoryDocumentStore.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LoggingDocumentStoreWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/SynchronizingDocumentStoreWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CountingDocumentStore.java
    
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreWrapper.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java
 Mon Dec 21 14:08:30 2015
@@ -217,6 +217,24 @@ public interface DocumentStore {
     <T extends Document> T createOrUpdate(Collection<T> collection, UpdateOp 
update);
 
     /**
+     * Create or unconditionally update a number of documents.
+     * <p>
+     * An implementation does not have to guarantee that all changes are 
applied
+     * atomically, together. In case of an exception (e.g. when a communication
+     * error occurs) only some changes may have been applied. In this case it 
is the
+     * responsibility of the caller to check which {@linkplain UpdateOp}s were 
applied and
+     * take appropriate action.
+     *
+     * @param <T> the document type
+     * @param collection the collection
+     * @param updateOps the update operation list
+     * @return the list containing old documents or <code>null</code> values 
if they didn't exist
+     *         before (see {@linkplain #createOrUpdate(Collection, 
UpdateOp)}), where the order
+     *         reflects the order in the "updateOps" parameter
+     */
+    <T extends Document> List<T> createOrUpdate(Collection<T> collection, 
List<UpdateOp> updateOps);
+
+    /**
      * Performs a conditional update (e.g. using
      * {@link UpdateOp.Condition.Type#EXISTS} and only updates the
      * document if the condition is <code>true</code>. The returned document is

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/memory/MemoryDocumentStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/memory/MemoryDocumentStore.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/memory/MemoryDocumentStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/memory/MemoryDocumentStore.java
 Mon Dec 21 14:08:30 2015
@@ -210,6 +210,15 @@ public class MemoryDocumentStore impleme
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection, List<UpdateOp> updateOps) {
+        List<T> result = new ArrayList<T>(updateOps.size());
+        for (UpdateOp update : updateOps) {
+            result.add(createOrUpdate(collection, update));
+        }
+        return result;
+    }
+
+    @Override
     public <T extends Document> T findAndUpdate(Collection<T> collection, 
UpdateOp update) {
         return internalCreateOrUpdate(collection, update, true);
     }

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
 Mon Dec 21 14:08:30 2015
@@ -792,6 +792,15 @@ public class MongoDocumentStore implemen
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection, List<UpdateOp> updateOps) {
+        List<T> result = new ArrayList<T>(updateOps.size());
+        for (UpdateOp update : updateOps) {
+            result.add(createOrUpdate(collection, update));
+        }
+        return result;
+    }
+
+    @Override
     public <T extends Document> T findAndUpdate(Collection<T> collection, 
UpdateOp update)
             throws DocumentStoreException {
         log("findAndUpdate", update);

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
 Mon Dec 21 14:08:30 2015
@@ -289,6 +289,15 @@ public class RDBDocumentStore implements
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection, List<UpdateOp> updateOps) {
+        List<T> result = new ArrayList<T>(updateOps.size());
+        for (UpdateOp update : updateOps) {
+            result.add(createOrUpdate(collection, update));
+        }
+        return result;
+    }
+
+    @Override
     public <T extends Document> T findAndUpdate(Collection<T> collection, 
UpdateOp update) {
         return internalCreateOrUpdate(collection, update, false, true);
     }

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LeaseCheckDocumentStoreWrapper.java
 Mon Dec 21 14:08:30 2015
@@ -127,6 +127,13 @@ public final class LeaseCheckDocumentSto
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection,
+            List<UpdateOp> updateOps) {
+        performLeaseCheck();
+        return delegate.createOrUpdate(collection, updateOps);
+    }
+
+    @Override
     public final <T extends Document> T findAndUpdate(Collection<T> collection,
             UpdateOp update) {
         performLeaseCheck();

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LoggingDocumentStoreWrapper.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LoggingDocumentStoreWrapper.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LoggingDocumentStoreWrapper.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LoggingDocumentStoreWrapper.java
 Mon Dec 21 14:08:30 2015
@@ -225,6 +225,23 @@ public class LoggingDocumentStoreWrapper
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(final Collection<T> 
collection,
+                                                       final List<UpdateOp> 
updateOps) {
+        try {
+            logMethod("createOrUpdate", collection, updateOps);
+            return logResult(new Callable<List<T>>() {
+                @Override
+                public List<T> call() throws Exception {
+                    return store.createOrUpdate(collection, updateOps);
+                }
+            });
+        } catch (Exception e) {
+            logException(e);
+            throw convert(e);
+        }
+    }
+
+    @Override
     public <T extends Document> T findAndUpdate(final Collection<T> collection,
                                                 final UpdateOp update) {
         try {

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/SynchronizingDocumentStoreWrapper.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/SynchronizingDocumentStoreWrapper.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/SynchronizingDocumentStoreWrapper.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/SynchronizingDocumentStoreWrapper.java
 Mon Dec 21 14:08:30 2015
@@ -97,6 +97,11 @@ public class SynchronizingDocumentStoreW
     }
 
     @Override
+    public synchronized <T extends Document> List<T> 
createOrUpdate(Collection<T> collection, List<UpdateOp> updateOps) {
+        return store.createOrUpdate(collection, updateOps);
+    }
+
+    @Override
     public synchronized <T extends Document> T findAndUpdate(final 
Collection<T> collection, final UpdateOp update) {
         return store.findAndUpdate(collection, update);
     }
@@ -142,7 +147,7 @@ public class SynchronizingDocumentStoreW
     }
 
     @Override
-    public Map<String, String> getMetadata() {
+    public synchronized Map<String, String> getMetadata() {
         return store.getMetadata();
     }
 }

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java
 Mon Dec 21 14:08:30 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.oak.plugins.document.util;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -251,6 +252,25 @@ public class TimingDocumentStoreWrapper
             }
             return result;
         } catch (Exception e) {
+            throw convert(e);
+        }
+    }
+
+    @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection, List<UpdateOp> updateOps) {
+        try {
+            long start = now();
+            List<T> result = base.createOrUpdate(collection, updateOps);
+            updateAndLogTimes("createOrUpdate", start, 0, size(result));
+            if (logCommonCall()) {
+                List<String> ids = new ArrayList<String>();
+                for (UpdateOp op : updateOps) {
+                    ids.add(op.getId());
+                }
+                logCommonCall(start, "createOrUpdate " + collection + " " + 
updateOps + " " + ids);
+            }
+            return result;
+        } catch (Exception e) {
             throw convert(e);
         }
     }

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BasicDocumentStoreTest.java
 Mon Dec 21 14:08:30 2015
@@ -181,7 +181,7 @@ public class BasicDocumentStoreTest exte
     }
 
     @Test
-    public void testConditionalupdateForbidden() {
+    public void testConditionalUpdateForbidden() {
         String id = this.getClass().getName() + 
".testConditionalupdateForbidden";
 
         // remove if present
@@ -214,6 +214,17 @@ public class BasicDocumentStoreTest exte
             fail("conditional createOrUpdate should fail");
         }
         catch (IllegalArgumentException expected) {
+            // reported by DocumentStore
+        }
+
+        try {
+            UpdateOp up = new UpdateOp(id, false);
+            up.set("_id", id);
+            up.equals("foo", "bar");
+            super.ds.createOrUpdate(Collection.NODES, 
Collections.singletonList(up));
+            fail("conditional createOrUpdate should fail");
+        }
+        catch (IllegalArgumentException expected) {
             // reported by DocumentStore
         }
 

Added: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BulkCreateOrUpdateTest.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BulkCreateOrUpdateTest.java?rev=1721160&view=auto
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BulkCreateOrUpdateTest.java
 (added)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BulkCreateOrUpdateTest.java
 Mon Dec 21 14:08:30 2015
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.document;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class BulkCreateOrUpdateTest extends AbstractDocumentStoreTest {
+
+    public BulkCreateOrUpdateTest(DocumentStoreFixture dsf) {
+        super(dsf);
+    }
+
+    /**
+     * This tests create multiple items using createOrUpdate() method. The
+     * return value should be a list of null values.
+     */
+    @Test
+    public void testCreateMultiple() {
+        final int amount = 100;
+
+        List<UpdateOp> updates = new ArrayList<UpdateOp>(amount);
+
+        for (int i = 0; i < amount; i++) {
+            String id = this.getClass().getName() + ".testCreateMultiple" + i;
+            UpdateOp up = new UpdateOp(id, true);
+            up.set("_id", id);
+            updates.add(up);
+            removeMe.add(id);
+        }
+
+        List<NodeDocument> docs = ds.createOrUpdate(Collection.NODES, updates);
+        assertEquals(amount, docs.size());
+        for (int i = 0; i < amount; i++) {
+            assertNull("There shouldn't be a value for created doc", 
docs.get(i));
+            assertNotNull("The node hasn't been created", 
ds.find(Collection.NODES, updates.get(i).getId()));
+        }
+    }
+
+    /**
+     * This method updates multiple items using createOrUpdate() method. The
+     * return value should be a list of items before the update.
+     */
+    @Test
+    public void testUpdateMultiple() {
+        final int amount = 100;
+        List<UpdateOp> updates = new ArrayList<UpdateOp>(amount);
+
+        for (int i = 0; i < amount; i++) {
+            String id = this.getClass().getName() + ".testUpdateMultiple" + i;
+            UpdateOp up = new UpdateOp(id, true);
+            up.set("_id", id);
+            up.set("prop", 100);
+            updates.add(up);
+            removeMe.add(id);
+        }
+
+        ds.create(Collection.NODES, updates);
+
+        for (int i = 0; i < amount; i++) {
+            UpdateOp up = updates.get(i).copy();
+            up.set("prop", 200);
+            updates.set(i, up);
+        }
+
+        List<NodeDocument> docs = ds.createOrUpdate(Collection.NODES, updates);
+        assertEquals(amount, docs.size());
+        for (int i = 0; i < amount; i++) {
+            NodeDocument oldDoc = docs.get(i);
+            String id = oldDoc.getId();
+            NodeDocument newDoc = ds.find(Collection.NODES, id);
+            assertEquals("The result list order is incorrect", 
updates.get(i).getId(), id);
+            assertEquals("The old value is not correct", 100l, 
oldDoc.get("prop"));
+            assertEquals("The document hasn't been updated", 200l, 
newDoc.get("prop"));
+        }
+    }
+
+    /**
+     * This method creates or updates multiple items using createOrUpdate()
+     * method. New items have odd indexes and updates items have even indexes.
+     * The return value should be a list of old documents (for the updates) or
+     * nulls (for the inserts).
+     */
+    @Test
+    public void testCreateOrUpdateMultiple() {
+        int amount = 100;
+        List<UpdateOp> updates = new ArrayList<UpdateOp>(amount);
+
+        // create even items
+        for (int i = 0; i < amount; i += 2) {
+            String id = this.getClass().getName() + 
".testCreateOrUpdateMultiple" + i;
+            UpdateOp up = new UpdateOp(id, true);
+            up.set("_id", id);
+            up.set("prop", 100);
+            updates.add(up);
+            removeMe.add(id);
+        }
+        ds.create(Collection.NODES, updates);
+        updates.clear();
+
+        // createOrUpdate all items
+        for (int i = 0; i < amount; i++) {
+            String id = this.getClass().getName() + 
".testCreateOrUpdateMultiple" + i;
+            UpdateOp up = new UpdateOp(id, true);
+            up.set("_id", id);
+            up.set("prop", 200);
+            updates.add(up);
+            removeMe.add(id);
+        }
+        List<NodeDocument> docs = ds.createOrUpdate(Collection.NODES, updates);
+
+        assertEquals(amount, docs.size());
+        for (int i = 0; i < amount; i++) {
+            String id = this.getClass().getName() + 
".testCreateOrUpdateMultiple" + i;
+
+            NodeDocument oldDoc = docs.get(i);
+            NodeDocument newDoc = ds.find(Collection.NODES, id);
+            if (i % 2 == 1) {
+                assertNull("The returned value should be null for created 
doc", oldDoc);
+            } else {
+                assertNotNull("The returned doc shouldn't be null for updated 
doc", oldDoc);
+                assertEquals("The old value is not correct", 100l, 
oldDoc.get("prop"));
+                assertEquals("The result list order is incorrect", 
updates.get(i).getId(), oldDoc.getId());
+            }
+            assertEquals("The document hasn't been updated", 200l, 
newDoc.get("prop"));
+        }
+    }
+}

Propchange: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/BulkCreateOrUpdateTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CountingDocumentStore.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CountingDocumentStore.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CountingDocumentStore.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/CountingDocumentStore.java
 Mon Dec 21 14:08:30 2015
@@ -171,6 +171,13 @@ public class CountingDocumentStore imple
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection,
+                                                       List<UpdateOp> 
updateOps) {
+        getStats(collection).numCreateOrUpdateCalls++;
+        return delegate.createOrUpdate(collection, updateOps);
+    }
+
+    @Override
     public <T extends Document> T findAndUpdate(Collection<T> collection,
                                                 UpdateOp update) {
         getStats(collection).numCreateOrUpdateCalls++;

Modified: 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreWrapper.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreWrapper.java?rev=1721160&r1=1721159&r2=1721160&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreWrapper.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentStoreWrapper.java
 Mon Dec 21 14:08:30 2015
@@ -107,6 +107,12 @@ public class DocumentStoreWrapper implem
     }
 
     @Override
+    public <T extends Document> List<T> createOrUpdate(Collection<T> 
collection,
+                                                       List<UpdateOp> 
updateOps) {
+        return store.createOrUpdate(collection, updateOps);
+    }
+
+    @Override
     public <T extends Document> T findAndUpdate(Collection<T> collection,
                                                 UpdateOp update) {
         return store.findAndUpdate(collection, update);


Reply via email to