jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1485155 - in /jackrabbit/oak/trunk/oak-mongomk/src: main/java/org/apache/jackrabbit/mongomk/ test/java/org/apache/jackrabbit/mongomk/ test/java/org/apache/jackrabbit/mongomk/blob/ test/java/org/apache/jackrabbit/mongomk/impl/command/
Date Wed, 22 May 2013 11:29:29 GMT
Author: thomasm
Date: Wed May 22 11:29:29 2013
New Revision: 1485155

URL: http://svn.apache.org/r1485155
Log:
OAK-98 Source code formatting, code conventions, Javadocs (@Override)

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/ClusterNodeInfo.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/DocumentStore.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoDocumentStore.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Node.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Revision.java
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/UpdateOp.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/RandomStream.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/blob/MongoBlobStoreTest.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentWriteMultipleMkMongoTest.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/ClusterNodeInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/ClusterNodeInfo.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/ClusterNodeInfo.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/ClusterNodeInfo.java
Wed May 22 11:29:29 2013
@@ -256,6 +256,7 @@ public class ClusterNodeInfo {
         store.createOrUpdate(Collection.CLUSTER_NODES, update);
     }
     
+    @Override
     public String toString() {
         return "id: " + id + ",\n" +
                 "startTime: " + startTime + ",\n" +

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/DocumentStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/DocumentStore.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/DocumentStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/DocumentStore.java
Wed May 22 11:29:29 2013
@@ -59,6 +59,7 @@ public interface DocumentStore {
             this.name = name;
         }
         
+        @Override
         public String toString() {
             return name;
         }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MemoryDocumentStore.java
Wed May 22 11:29:29 2013
@@ -48,10 +48,12 @@ public class MemoryDocumentStore impleme
     private ConcurrentSkipListMap<String, Map<String, Object>> clusterNodes =
             new ConcurrentSkipListMap<String, Map<String, Object>>();
 
+    @Override
     public Map<String, Object> find(Collection collection, String key, int maxCacheAge)
{
         return find(collection, key);
     }
     
+    @Override
     public Map<String, Object> find(Collection collection, String key) {
         ConcurrentSkipListMap<String, Map<String, Object>> map = getMap(collection);
         Map<String, Object> n = map.get(key);
@@ -65,6 +67,7 @@ public class MemoryDocumentStore impleme
         return copy;
     }
     
+    @Override
     @Nonnull
     public List<Map<String, Object>> query(Collection collection, String fromKey,
String toKey, int limit) {
         ConcurrentSkipListMap<String, Map<String, Object>> map = getMap(collection);
@@ -83,6 +86,7 @@ public class MemoryDocumentStore impleme
         return list;
     }
 
+    @Override
     public void remove(Collection collection, String path) {
         getMap(collection).remove(path);
     }
@@ -272,6 +276,7 @@ public class MemoryDocumentStore impleme
         return true;
     }
 
+    @Override
     public String toString() {
         StringBuilder buff = new StringBuilder();
         buff.append("Nodes:\n");

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoDocumentStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoDocumentStore.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoDocumentStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoDocumentStore.java
Wed May 22 11:29:29 2013
@@ -100,6 +100,7 @@ public class MongoDocumentStore implemen
         }
     }
     
+    @Override
     public void finalize() throws Throwable {
         super.finalize();
         // TODO should not be needed, but it seems
@@ -119,6 +120,7 @@ public class MongoDocumentStore implemen
         }
     }
 
+    @Override
     public Map<String, Object> find(Collection collection, String key) {
         return find(collection, key, Integer.MAX_VALUE);
     }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/MongoMK.java
Wed May 22 11:29:29 2013
@@ -1382,6 +1382,8 @@ public class MongoMK implements MicroKer
             delay = mk.getAsyncDelay();
             this.isDisposed = isDisposed;
         }
+
+        @Override
         public void run() {
             while (delay != 0 && !isDisposed.get()) {
                 synchronized (isDisposed) {

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Node.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Node.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Node.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Node.java
Wed May 22 11:29:29 2013
@@ -59,6 +59,7 @@ public class Node {
         newNode.properties.putAll(properties);
     }
 
+    @Override
     public String toString() {
         StringBuilder buff = new StringBuilder();
         buff.append("path: ").append(path).append('\n');
@@ -124,6 +125,7 @@ public class Node {
             this.rev = rev;
         }
         
+        @Override
         public String toString() {
             return path + ": " + children.toString();
         }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Revision.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Revision.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Revision.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/Revision.java
Wed May 22 11:29:29 2013
@@ -144,6 +144,7 @@ public class Revision {
         return r;
     }
     
+    @Override
     public String toString() {
         return new StringBuilder("r").
                 append(Long.toHexString(timestamp)).
@@ -162,10 +163,12 @@ public class Revision {
         return counter;
     }
     
+    @Override
     public int hashCode() {
         return (int) (timestamp >>> 32) ^ (int) timestamp ^ counter ^ clusterId;
     }
     
+    @Override
     public boolean equals(Object other) {
         if (this == other) {
             return true;
@@ -200,6 +203,7 @@ public class Revision {
          */
         Revision seenAt;
         
+        @Override
         public String toString() {
             return revision + ":" + seenAt;
         }
@@ -389,6 +393,7 @@ public class Revision {
             return result;
         }
         
+        @Override
         public String toString() {
             StringBuilder buff = new StringBuilder();
             for (int clusterId : new TreeSet<Integer>(map.keySet())) {

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/UpdateOp.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/UpdateOp.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/UpdateOp.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/UpdateOp.java
Wed May 22 11:29:29 2013
@@ -241,6 +241,7 @@ public class UpdateOp {
         return reverse;
     }
 
+    @Override
     public String toString() {
         return "key: " + key + " " + (isNew ? "new" : "update") + " " + changes;
     }
@@ -303,6 +304,7 @@ public class UpdateOp {
          */
         Object value;
         
+        @Override
         public String toString() {
             return type + " " + value;
         }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/RandomStream.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/RandomStream.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/RandomStream.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/RandomStream.java
Wed May 22 11:29:29 2013
@@ -32,12 +32,14 @@ public class RandomStream extends InputS
         this.random = new Random(seed);
     }
 
+    @Override
     public int read() {
         byte[] data = new byte[1];
         int len = read(data, 0, 1);
         return len <= 0 ? len : data[0] & 255;
     }
 
+    @Override
     public int read(byte[] b, int off, int len) {
         if (pos >= size) {
             return -1;

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/blob/MongoBlobStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/blob/MongoBlobStoreTest.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/blob/MongoBlobStoreTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/blob/MongoBlobStoreTest.java
Wed May 22 11:29:29 2013
@@ -108,9 +108,11 @@ public class MongoBlobStoreTest extends 
     public void testCloseStream() throws Exception {
         final AtomicBoolean closed = new AtomicBoolean();
         InputStream in = new InputStream() {
+            @Override
             public void close() {
                 closed.set(true);
             }
+            @Override
             public int read() throws IOException {
                 return -1;
             }
@@ -123,9 +125,11 @@ public class MongoBlobStoreTest extends 
     public void testExceptionWhileReading() throws Exception {
         final AtomicBoolean closed = new AtomicBoolean();
         InputStream in = new InputStream() {
+            @Override
             public void close() {
                 closed.set(true);
             }
+            @Override
             public int read() throws IOException {
                 throw new RuntimeException("abc");
             }

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentWriteMultipleMkMongoTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentWriteMultipleMkMongoTest.java?rev=1485155&r1=1485154&r2=1485155&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentWriteMultipleMkMongoTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/command/ConcurrentWriteMultipleMkMongoTest.java
Wed May 22 11:29:29 2013
@@ -113,6 +113,7 @@ public class ConcurrentWriteMultipleMkMo
             this.nodesPerCommit = nodesPerCommit;
         }
         
+        @Override
         public String toString() {
             return id;
         }



Mime
View raw message