jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1503140 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk: Branch.java Commit.java MongoMK.java
Date Mon, 15 Jul 2013 08:50:30 GMT
Author: thomasm
Date: Mon Jul 15 08:50:29 2013
New Revision: 1503140

URL: http://svn.apache.org/r1503140
Log:
OAK-98 Formatting, javadocs, remove unused code

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Branch.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Commit.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/MongoMK.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Branch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Branch.java?rev=1503140&r1=1503139&r2=1503140&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Branch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Branch.java
Mon Jul 15 08:50:29 2013
@@ -195,6 +195,9 @@ class Branch {
         return null;
     }
 
+    /**
+     * Information about a commit within a branch.
+     */
     private static final class BranchCommit {
 
         private final UnsavedModifications modifications = new UnsavedModifications();

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Commit.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Commit.java?rev=1503140&r1=1503139&r2=1503140&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Commit.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/Commit.java
Mon Jul 15 08:50:29 2013
@@ -467,6 +467,8 @@ public class Commit {
 
     /**
      * Apply the changes to the MongoMK (to update the cache).
+     * 
+     * @param isBranchCommit whether this is a commit to a branch
      */
     public void applyToCache(boolean isBranchCommit) {
         HashMap<String, ArrayList<String>> nodesWithChangedChildren = new HashMap<String,
ArrayList<String>>();

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/MongoMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/MongoMK.java?rev=1503140&r1=1503139&r2=1503140&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/MongoMK.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/MongoMK.java
Mon Jul 15 08:50:29 2013
@@ -212,7 +212,7 @@ public class MongoMK implements MicroKer
 
     MongoMK(Builder builder) {
 
-        if(builder.isUseSimpleRevision()){
+        if (builder.isUseSimpleRevision()) {
             this.simpleRevisionCounter = new AtomicInteger(0);
         }
 
@@ -607,7 +607,7 @@ public class MongoMK implements MicroKer
         return includeRevision(revision, readRevision);
     }
 
-    public Children getChildren(final String path, final Revision rev, final int limit) 
throws MicroKernelException{
+    public Children getChildren(final String path, final Revision rev, final int limit) 
throws MicroKernelException {
         checkRevisionAge(rev, path);
         String key = path + "@" + rev;
         Children children;
@@ -619,7 +619,7 @@ public class MongoMK implements MicroKer
                 }
             });
         } catch (ExecutionException e) {
-            throw new MicroKernelException("Error occurred while fetching children nodes
for path "+path,e);
+            throw new MicroKernelException("Error occurred while fetching children nodes
for path "+path, e);
         }
 
         //In case the limit > cached children size and there are more child nodes
@@ -712,7 +712,8 @@ public class MongoMK implements MicroKer
         // filter out revisions newer than branch base
         if (branch != null) {
             Revision base = branch.getBase(readRevision);
-            for (Iterator<Revision> it = lastRevs.values().iterator(); it.hasNext();
) {
+            for (Iterator<Revision> it = lastRevs.values().iterator(); it
+                    .hasNext();) {
                 Revision r = it.next();
                 if (isRevisionNewer(r, base)) {
                     it.remove();
@@ -894,7 +895,6 @@ public class MongoMK implements MicroKer
     
     private void diffManyChildren(JsopWriter w, String path, Revision fromRev, Revision toRev)
{
         long minTimestamp = Math.min(fromRev.getTimestamp(), toRev.getTimestamp());
-        Revision rev = isRevisionNewer(fromRev, toRev) ? toRev : fromRev;
         long minValue = Commit.getModified(minTimestamp);
         String fromKey = Utils.getKeyLowerLimit(path);
         String toKey = Utils.getKeyUpperLimit(path);
@@ -1806,12 +1806,12 @@ public class MongoMK implements MicroKer
             return diffCacheSize;
         }
 
-        public Builder setUseSimpleRevision(boolean useSimpleRevision){
+        public Builder setUseSimpleRevision(boolean useSimpleRevision) {
             this.useSimpleRevision = useSimpleRevision;
             return this;
         }
 
-        public boolean isUseSimpleRevision(){
+        public boolean isUseSimpleRevision() {
             return useSimpleRevision;
         }
 



Mime
View raw message