jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1438033 - in /jackrabbit/oak/trunk/oak-mongomk/src: main/java/org/apache/jackrabbit/mongomk/impl/ main/java/org/apache/jackrabbit/mongomk/impl/action/ main/java/org/apache/jackrabbit/mongomk/impl/command/ test/java/org/apache/jackrabbit/mo...
Date Thu, 24 Jan 2013 14:56:12 GMT
Author: mreutegg
Date: Thu Jan 24 14:56:11 2013
New Revision: 1438033

URL: http://svn.apache.org/viewvc?rev=1438033&view=rev
Log:
OAK-584: Clean up XXXNew classes

Added:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
      - copied, changed from r1438025, jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
      - copied, changed from r1438023, jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommand.java
      - copied, changed from r1438023, jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommandNew.java
Removed:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommandNew.java
Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoNodeStore.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/DiffCommand.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetJournalCommand.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetRevisionHistoryCommand.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/MergeCommand.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/NodeExistsCommand.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/OneLevelDiffCommand.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionTest.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/SimpleNodeScenario.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandTest.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentCommitCommandTest.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentConflictingCommitCommandTest.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoNodeStore.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoNodeStore.java
Thu Jan 24 14:56:11 2013
@@ -26,12 +26,12 @@ import org.apache.jackrabbit.mongomk.api
 import org.apache.jackrabbit.mongomk.api.model.Commit;
 import org.apache.jackrabbit.mongomk.api.model.Node;
 import org.apache.jackrabbit.mongomk.impl.action.FetchCommitAction;
-import org.apache.jackrabbit.mongomk.impl.command.CommitCommandNew;
+import org.apache.jackrabbit.mongomk.impl.command.CommitCommand;
 import org.apache.jackrabbit.mongomk.impl.command.DefaultCommandExecutor;
 import org.apache.jackrabbit.mongomk.impl.command.DiffCommand;
 import org.apache.jackrabbit.mongomk.impl.command.GetHeadRevisionCommand;
 import org.apache.jackrabbit.mongomk.impl.command.GetJournalCommand;
-import org.apache.jackrabbit.mongomk.impl.command.GetNodesCommandNew;
+import org.apache.jackrabbit.mongomk.impl.command.GetNodesCommand;
 import org.apache.jackrabbit.mongomk.impl.command.GetRevisionHistoryCommand;
 import org.apache.jackrabbit.mongomk.impl.command.MergeCommand;
 import org.apache.jackrabbit.mongomk.impl.command.NodeExistsCommand;
@@ -105,7 +105,7 @@ public class MongoNodeStore implements N
 
     @Override
     public String commit(Commit commit) throws Exception {
-        Command<Long> command = new CommitCommandNew(this, commit);
+        Command<Long> command = new CommitCommand(this, commit);
         Long revisionId = commandExecutor.execute(command);
         return MongoUtil.fromMongoRepresentation(revisionId);
     }
@@ -132,7 +132,7 @@ public class MongoNodeStore implements N
     @Override
     public Node getNodes(String path, String revisionId, int depth, long offset,
             int maxChildNodes, String filter) throws Exception {
-        GetNodesCommandNew command = new GetNodesCommandNew(this, path,
+        GetNodesCommand command = new GetNodesCommand(this, path,
                 MongoUtil.toMongoRepresentation(revisionId));
         command.setBranchId(getBranchId(revisionId));
         command.setDepth(depth);

Copied: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
(from r1438025, jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java?p2=jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java&p1=jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java&r1=1438025&r2=1438033&rev=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionNew.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesAction.java
Thu Jan 24 14:56:11 2013
@@ -45,7 +45,7 @@ import static com.google.common.base.Pre
 /**
  * An action for fetching nodes.
  */
-public class FetchNodesActionNew extends BaseAction<Map<String, MongoNode>> {
+public class FetchNodesAction extends BaseAction<Map<String, MongoNode>> {
 
     /**
      * Trunk commits within this time frame are considered in doubt and are
@@ -54,7 +54,7 @@ public class FetchNodesActionNew extends
     private static final long IN_DOUBT_TIME_FRAME = 10000;
 
     public static final int LIMITLESS_DEPTH = -1;
-    private static final Logger LOG = LoggerFactory.getLogger(FetchNodesActionNew.class);
+    private static final Logger LOG = LoggerFactory.getLogger(FetchNodesAction.class);
 
     private final Set<String> paths;
     private long revisionId;
@@ -76,8 +76,10 @@ public class FetchNodesActionNew extends
      * @param depth The depth.
      * @param revisionId The revision id.
      */
-    public FetchNodesActionNew(MongoNodeStore nodeStore, String path, int depth,
-            long revisionId) {
+    public FetchNodesAction(MongoNodeStore nodeStore,
+                            String path,
+                            int depth,
+                            long revisionId) {
         super(nodeStore);
         checkArgument(revisionId >= 0, "revisionId must be >= 0");
         paths = new HashSet<String>();
@@ -94,7 +96,9 @@ public class FetchNodesActionNew extends
      * @param paths The exact paths to fetch nodes for.
      * @param revisionId The revision id.
      */
-    public FetchNodesActionNew(MongoNodeStore nodeStore, Set<String> paths, long revisionId)
{
+    public FetchNodesAction(MongoNodeStore nodeStore,
+                            Set<String> paths,
+                            long revisionId) {
         super(nodeStore);
         checkArgument(revisionId >= 0, "revisionId must be >= 0");
         this.paths = paths;

Copied: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
(from r1438023, jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java?p2=jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java&p1=jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java&r1=1438023&r2=1438033&rev=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandNew.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommand.java
Thu Jan 24 14:56:11 2013
@@ -50,14 +50,11 @@ import com.mongodb.WriteConcern;
 import com.mongodb.WriteResult;
 
 /**
- * FIXME - This is same as CommitCommand except that it does not fetch all valid
- * commits upfront. Consolidate the two.
- *
  * {@code Command} for {@code MongoMicroKernel#commit(String, String, String, String)}
  */
-public class CommitCommandNew extends BaseCommand<Long> {
+public class CommitCommand extends BaseCommand<Long> {
 
-    private static final Logger logger = LoggerFactory.getLogger(CommitCommandNew.class);
+    private static final Logger logger = LoggerFactory.getLogger(CommitCommand.class);
 
     private final MongoCommit commit;
 
@@ -76,7 +73,7 @@ public class CommitCommandNew extends Ba
      * @param nodeStore Node store.
      * @param commit {@link Commit}
      */
-    public CommitCommandNew(MongoNodeStore nodeStore, Commit commit) {
+    public CommitCommand(MongoNodeStore nodeStore, Commit commit) {
         super(nodeStore);
         this.commit = (MongoCommit)commit;
         this.initialBaseRevisionId = commit.getBaseRevisionId();
@@ -179,7 +176,7 @@ public class CommitCommandNew extends Ba
     }
 
 //    private void readExistingNodes() {
-//        FetchNodesActionNew action = new FetchNodesActionNew(nodeStore, affectedPaths,
+//        FetchNodesAction action = new FetchNodesAction(nodeStore, affectedPaths,
 //                mongoSync.getHeadRevisionId());
 //        action.setBranchId(branchId);
 //        existingNodes = action.execute();

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/DiffCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/DiffCommand.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/DiffCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/DiffCommand.java
Thu Jan 24 14:56:11 2013
@@ -97,7 +97,7 @@ public class DiffCommand extends BaseCom
     }
 
     private Node getNode(String path, long revisionId) throws Exception {
-        GetNodesCommandNew command = new GetNodesCommandNew(nodeStore, path, revisionId);
+        GetNodesCommand command = new GetNodesCommand(nodeStore, path, revisionId);
         return command.execute();
     }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetJournalCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetJournalCommand.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetJournalCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetJournalCommand.java
Thu Jan 24 14:56:11 2013
@@ -133,6 +133,6 @@ public class GetJournalCommand extends B
     }
 
     private Node getNode(String path, long revisionId) throws Exception {
-        return new GetNodesCommandNew(nodeStore, path, revisionId).execute();
+        return new GetNodesCommand(nodeStore, path, revisionId).execute();
     }
 }
\ No newline at end of file

Copied: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommand.java
(from r1438023, jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommandNew.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommand.java?p2=jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommand.java&p1=jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommandNew.java&r1=1438023&r2=1438033&rev=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommandNew.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetNodesCommand.java
Thu Jan 24 14:56:11 2013
@@ -23,7 +23,6 @@ import java.util.Map;
 import org.apache.jackrabbit.mongomk.api.model.Node;
 import org.apache.jackrabbit.mongomk.impl.MongoNodeStore;
 import org.apache.jackrabbit.mongomk.impl.action.FetchNodesAction;
-import org.apache.jackrabbit.mongomk.impl.action.FetchNodesActionNew;
 import org.apache.jackrabbit.mongomk.impl.command.exception.InconsistentNodeHierarchyException;
 import org.apache.jackrabbit.mongomk.impl.model.MongoNode;
 import org.apache.jackrabbit.mongomk.impl.model.NodeImpl;
@@ -32,14 +31,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * FIXME - This is same as GetNodesCommand except that it does not fetch all valid
- * commits upfront and it also does not check for stale slave reads. Consolidate the two.
- *
  * {@code Command} for {@code MongoMicroKernel#getNodes(String, String, int, long, int, String)}
  */
-public class GetNodesCommandNew extends BaseCommand<Node> {
+public class GetNodesCommand extends BaseCommand<Node> {
 
-    private static final Logger LOG = LoggerFactory.getLogger(GetNodesCommandNew.class);
+    private static final Logger LOG = LoggerFactory.getLogger(GetNodesCommand.class);
 
     private final String path;
 
@@ -57,8 +53,9 @@ public class GetNodesCommandNew extends 
      * @param path The root path of the nodes to get.
      * @param revisionId The revision id or null for head revision.
      */
-    public GetNodesCommandNew(MongoNodeStore nodeStore, String path,
-            Long revisionId) {
+    public GetNodesCommand(MongoNodeStore nodeStore,
+                           String path,
+                           Long revisionId) {
         super(nodeStore);
         this.path = path;
         this.revisionId = revisionId;
@@ -135,7 +132,7 @@ public class GetNodesCommandNew extends 
     }
 
     private void readNodesByPath() {
-        FetchNodesActionNew query = new FetchNodesActionNew(nodeStore, path, depth, revisionId);
+        FetchNodesAction query = new FetchNodesAction(nodeStore, path, depth, revisionId);
         query.setBranchId(branchId);
         pathAndNodeMap = query.execute();
     }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetRevisionHistoryCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetRevisionHistoryCommand.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetRevisionHistoryCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/GetRevisionHistoryCommand.java
Thu Jan 24 14:56:11 2013
@@ -100,6 +100,6 @@ public class GetRevisionHistoryCommand e
     }
 
     private Node getNode(String path, long revisionId) throws Exception {
-        return new GetNodesCommandNew(nodeStore, path, revisionId).execute();
+        return new GetNodesCommand(nodeStore, path, revisionId).execute();
     }
 }
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/MergeCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/MergeCommand.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/MergeCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/MergeCommand.java
Thu Jan 24 14:56:11 2013
@@ -114,7 +114,7 @@ public class MergeCommand extends BaseCo
                     MongoUtil.fromMongoRepresentation(currentHead), message);
         }
 
-        Command<Long> command = new CommitCommandNew(nodeStore, newCommit);
+        Command<Long> command = new CommitCommand(nodeStore, newCommit);
         long revision = command.execute();
         return MongoUtil.fromMongoRepresentation(revision);
     }
@@ -266,7 +266,7 @@ public class MergeCommand extends BaseCo
     }
 
     private Node getNode(String path, long revisionId, String branchId) throws Exception
{
-        GetNodesCommandNew command = new GetNodesCommandNew(nodeStore, path, revisionId);
+        GetNodesCommand command = new GetNodesCommand(nodeStore, path, revisionId);
         command.setBranchId(branchId);
         return command.execute();
     }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/NodeExistsCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/NodeExistsCommand.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/NodeExistsCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/NodeExistsCommand.java
Thu Jan 24 14:56:11 2013
@@ -19,7 +19,7 @@ package org.apache.jackrabbit.mongomk.im
 import java.util.Map;
 
 import org.apache.jackrabbit.mongomk.impl.MongoNodeStore;
-import org.apache.jackrabbit.mongomk.impl.action.FetchNodesActionNew;
+import org.apache.jackrabbit.mongomk.impl.action.FetchNodesAction;
 import org.apache.jackrabbit.mongomk.impl.model.MongoNode;
 
 /**
@@ -60,7 +60,7 @@ public class NodeExistsCommand extends B
             revisionId = new GetHeadRevisionCommand(nodeStore).execute();
         }
 
-        FetchNodesActionNew action = new FetchNodesActionNew(nodeStore, path, 0, revisionId);
+        FetchNodesAction action = new FetchNodesAction(nodeStore, path, 0, revisionId);
         action.setBranchId(branchId);
 
         Map<String, MongoNode> pathAndNodeMap = action.execute();

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/OneLevelDiffCommand.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/OneLevelDiffCommand.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/OneLevelDiffCommand.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/command/OneLevelDiffCommand.java
Thu Jan 24 14:56:11 2013
@@ -25,7 +25,7 @@ import org.apache.jackrabbit.mk.json.Jso
 import org.apache.jackrabbit.mk.model.tree.DiffBuilder;
 import org.apache.jackrabbit.mongomk.impl.MongoNodeStore;
 import org.apache.jackrabbit.mongomk.impl.action.FetchCommitAction;
-import org.apache.jackrabbit.mongomk.impl.action.FetchNodesActionNew;
+import org.apache.jackrabbit.mongomk.impl.action.FetchNodesAction;
 import org.apache.jackrabbit.mongomk.impl.model.MongoCommit;
 import org.apache.jackrabbit.mongomk.impl.model.MongoNode;
 import org.apache.jackrabbit.mongomk.impl.model.NodeImpl;
@@ -61,11 +61,11 @@ public class OneLevelDiffCommand extends
                 nodeStore, fromRevision).execute();
         MongoCommit toCommit = new FetchCommitAction(
                 nodeStore, toRevision).execute();
-        FetchNodesActionNew action = new FetchNodesActionNew(
+        FetchNodesAction action = new FetchNodesAction(
                 nodeStore, path, 0, fromRevision);
         action.setBranchId(fromCommit.getBranchId());
         NodeImpl fromNode = MongoNode.toNode(action.execute().get(path));
-        action = new FetchNodesActionNew(
+        action = new FetchNodesAction(
                 nodeStore, path, 0, toRevision);
         action.setBranchId(toCommit.getBranchId());
         NodeImpl toNode = MongoNode.toNode(action.execute().get(path));

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionTest.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/FetchNodesActionTest.java
Thu Jan 24 14:56:11 2013
@@ -104,21 +104,21 @@ public class FetchNodesActionTest extend
         long rev = addNode("a/b/c");
 
         int depth = 0;
-        FetchNodesActionNew action = new FetchNodesActionNew(getNodeStore(),
+        FetchNodesAction action = new FetchNodesAction(getNodeStore(),
                 "/a/b", depth, rev);
         Map<String, MongoNode> nodes = action.execute();
         assertEquals(1, nodes.size());
         assertNotNull(nodes.get("/a/b"));
 
         depth = 1;
-        action = new FetchNodesActionNew(getNodeStore(), "/a/b", depth, rev);
+        action = new FetchNodesAction(getNodeStore(), "/a/b", depth, rev);
         nodes = action.execute();
         assertEquals(2, nodes.size());
         assertNotNull(nodes.get("/a/b"));
         assertNotNull(nodes.get("/a/b/c"));
 
-        depth = FetchNodesActionNew.LIMITLESS_DEPTH;
-        action = new FetchNodesActionNew(getNodeStore(), "/a/b", depth, rev);
+        depth = FetchNodesAction.LIMITLESS_DEPTH;
+        action = new FetchNodesAction(getNodeStore(), "/a/b", depth, rev);
         nodes = action.execute();
         assertEquals(2, nodes.size());
         assertNotNull(nodes.get("/a/b"));
@@ -249,7 +249,7 @@ public class FetchNodesActionTest extend
     }
 
     private List<Node> createAndExecuteQuery(long revisionId, Set<String> paths,
int depth) {
-        FetchNodesActionNew query = new FetchNodesActionNew(getNodeStore(), paths, revisionId);
+        FetchNodesAction query = new FetchNodesAction(getNodeStore(), paths, revisionId);
         return toNode(query.execute());
     }
 

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/SimpleNodeScenario.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/SimpleNodeScenario.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/SimpleNodeScenario.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/action/SimpleNodeScenario.java
Thu Jan 24 14:56:11 2013
@@ -18,7 +18,8 @@ package org.apache.jackrabbit.mongomk.im
 
 import org.apache.jackrabbit.mongomk.api.model.Commit;
 import org.apache.jackrabbit.mongomk.impl.MongoNodeStore;
-import org.apache.jackrabbit.mongomk.impl.command.CommitCommandNew;
+import org.apache.jackrabbit.mongomk.impl.command.CommitCommand;
+import org.apache.jackrabbit.mongomk.impl.command.CommitCommand;
 import org.apache.jackrabbit.mongomk.impl.model.CommitBuilder;
 
 /**
@@ -51,26 +52,26 @@ public class SimpleNodeScenario {
         Commit commit = CommitBuilder.build("/",
                 "+\"a\" : { \"int\" : 1 , \"b\" : { \"string\" : \"foo\" } , \"c\" : { \"bool\"
: true } }",
                 "This is the simple node scenario with nodes /, /a, /a/b, /a/c");
-        return new CommitCommandNew(nodeStore, commit).execute();
+        return new CommitCommand(nodeStore, commit).execute();
     }
 
     public Long addChildrenToA(int count) throws Exception {
         Long revisionId = null;
         for (int i = 1; i <= count; i++) {
             Commit commit = CommitBuilder.build("/a", "+\"child" + i + "\" : {}", "Add child"
+ i);
-            revisionId = new CommitCommandNew(nodeStore, commit).execute();
+            revisionId = new CommitCommand(nodeStore, commit).execute();
         }
         return revisionId;
     }
 
     public Long delete_A() throws Exception {
         Commit commit = CommitBuilder.build("/", "-\"a\"", "This is a commit with deleted
/a");
-        return new CommitCommandNew(nodeStore, commit).execute();
+        return new CommitCommand(nodeStore, commit).execute();
     }
 
     public Long delete_B() throws Exception {
         Commit commit = CommitBuilder.build("/a", "-\"b\"", "This is a commit with deleted
/a/b");
-        return new CommitCommandNew(nodeStore, commit).execute();
+        return new CommitCommand(nodeStore, commit).execute();
     }
 
     public Long update_A_and_add_D_and_E() throws Exception {
@@ -82,6 +83,6 @@ public class SimpleNodeScenario {
         diff.append("^\"a/b/e/array\" : [ 123, null, 123.456, \"for:bar\", true ]");
         Commit commit = CommitBuilder.build("/", diff.toString(),
                 "This is a commit with updated /a and added /a/d and /a/b/e");
-        return new CommitCommandNew(nodeStore, commit).execute();
+        return new CommitCommand(nodeStore, commit).execute();
     }
 }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandTest.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/CommitCommandTest.java
Thu Jan 24 14:56:11 2013
@@ -34,7 +34,7 @@ public class CommitCommandTest extends B
     @Test
     public void initialCommit() throws Exception {
         Commit commit = CommitBuilder.build("/", "+\"a\" : { \"b\" : {} , \"c\" : {} }",
null);
-        CommitCommandNew command = new CommitCommandNew(getNodeStore(), commit);
+        CommitCommand command = new CommitCommand(getNodeStore(), commit);
         Long revisionId = command.execute();
 
         Assert.assertNotNull(revisionId);

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentCommitCommandTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentCommitCommandTest.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentCommitCommandTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentCommitCommandTest.java
Thu Jan 24 14:56:11 2013
@@ -46,11 +46,11 @@ public class ConcurrentCommitCommandTest
         final Object waitLock = new Object();
 
         // create the commands
-        List<CommitCommandNew> commands = new ArrayList<CommitCommandNew>(numOfConcurrentThreads);
+        List<CommitCommand> commands = new ArrayList<CommitCommand>(numOfConcurrentThreads);
         for (int i = 0; i < numOfConcurrentThreads; ++i) {
             Commit commit = CommitBuilder.build("/", "+\"" + i + "\" : {}",
                     "This is a concurrent commit");
-            CommitCommandNew command = new CommitCommandNew(getNodeStore(), commit) {
+            CommitCommand command = new CommitCommand(getNodeStore(), commit) {
                 @Override
                 protected boolean saveAndSetHeadRevision() throws Exception {
                     try {
@@ -73,7 +73,7 @@ public class ConcurrentCommitCommandTest
         ExecutorService executorService = Executors.newFixedThreadPool(numOfConcurrentThreads);
         final List<Long> revisionIds = new LinkedList<Long>();
         for (int i = 0; i < numOfConcurrentThreads; ++i) {
-            final CommitCommandNew command = commands.get(i);
+            final CommitCommand command = commands.get(i);
             Runnable runnable = new Runnable() {
 
                 @Override
@@ -109,7 +109,7 @@ public class ConcurrentCommitCommandTest
         List<String> lastChildren = new LinkedList<String>();
         for (int i = 0; i < numOfConcurrentThreads; ++i) {
             Long revisionId = revisionIds.get(i);
-            GetNodesCommandNew command2 = new GetNodesCommandNew(getNodeStore(),
+            GetNodesCommand command2 = new GetNodesCommand(getNodeStore(),
                     "/", revisionId);
             Node root = command2.execute();
 

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentConflictingCommitCommandTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentConflictingCommitCommandTest.java?rev=1438033&r1=1438032&r2=1438033&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentConflictingCommitCommandTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentConflictingCommitCommandTest.java
Thu Jan 24 14:56:11 2013
@@ -42,9 +42,9 @@ public class ConcurrentConflictingCommit
     public void rootUpdate() throws Exception {
         int n = 2;
         CountDownLatch latch = new CountDownLatch(n - 1);
-        CommitCommandNew cmd1 = new WaitingCommitCommand(getNodeStore(),
+        CommitCommand cmd1 = new WaitingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a1\" : {}", null), latch);
-        CommitCommandNew cmd2 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd2 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a2\" : {}", null), latch);
 
         ExecutorService executorService = Executors.newFixedThreadPool(n);
@@ -70,9 +70,9 @@ public class ConcurrentConflictingCommit
 
         int n = 2;
         CountDownLatch latch = new CountDownLatch(n - 1);
-        CommitCommandNew cmd1 = new WaitingCommitCommand(getNodeStore(),
+        CommitCommand cmd1 = new WaitingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a1/b1\" : {}", null), latch);
-        CommitCommandNew cmd2 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd2 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a2/b1\" : {}", null), latch);
 
         ExecutorService executorService = Executors.newFixedThreadPool(n);
@@ -99,11 +99,11 @@ public class ConcurrentConflictingCommit
 
         int n = 3;
         CountDownLatch latch = new CountDownLatch(n - 1);
-        CommitCommandNew cmd1 = new WaitingCommitCommand(getNodeStore(),
+        CommitCommand cmd1 = new WaitingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a1/b1\" : {}", null), latch);
-        CommitCommandNew cmd2 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd2 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a2/b1\" : {}", null), latch);
-        CommitCommandNew cmd3 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd3 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a3/b1\" : {}", null), latch);
 
 
@@ -132,11 +132,11 @@ public class ConcurrentConflictingCommit
 
         int n = 3;
         CountDownLatch latch = new CountDownLatch(n - 1);
-        CommitCommandNew cmd1 = new WaitingCommitCommand(getNodeStore(),
+        CommitCommand cmd1 = new WaitingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a1/b1\" : {}", null), latch);
-        CommitCommandNew cmd2 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd2 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a2/b1\" : {}", null), latch);
-        CommitCommandNew cmd3 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd3 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a1/b2\" : {}", null), latch);
 
 
@@ -169,11 +169,11 @@ public class ConcurrentConflictingCommit
         mk.commit("/", "+\"c\" : {}", null, null);
         int n = 3;
         CountDownLatch latch = new CountDownLatch(n - 1);
-        CommitCommandNew cmd1 = new WaitingCommitCommand(getNodeStore(),
+        CommitCommand cmd1 = new WaitingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"a\" : {}", null), latch);
-        CommitCommandNew cmd2 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd2 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"c/d\" : {}", null), latch);
-        CommitCommandNew cmd3 = new NotifyingCommitCommand(getNodeStore(),
+        CommitCommand cmd3 = new NotifyingCommitCommand(getNodeStore(),
                 CommitBuilder.build("/", "+\"b\" : {}", null), latch);
 
         ExecutorService executorService = Executors.newFixedThreadPool(n);
@@ -194,7 +194,7 @@ public class ConcurrentConflictingCommit
     /**
      * A CommitCommand that simply waits on the waitLock until notified.
      */
-    private static class WaitingCommitCommand extends CommitCommandNew {
+    private static class WaitingCommitCommand extends CommitCommand {
 
         private final CountDownLatch latch;
 
@@ -219,7 +219,7 @@ public class ConcurrentConflictingCommit
     /**
      * A CommitCommand that notifies on the waitLock.
      */
-    private static class NotifyingCommitCommand extends CommitCommandNew {
+    private static class NotifyingCommitCommand extends CommitCommand {
 
         private final CountDownLatch latch;
 
@@ -248,9 +248,9 @@ public class ConcurrentConflictingCommit
      */
     private static class CommitCallable implements Callable<Long> {
 
-        private final CommitCommandNew command;
+        private final CommitCommand command;
 
-        public CommitCallable(CommitCommandNew  command) {
+        public CommitCallable(CommitCommand command) {
             this.command = command;
         }
 



Mime
View raw message