jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1244555 - in /jackrabbit/sandbox/microkernel/src: main/java/org/apache/jackrabbit/mk/ main/java/org/apache/jackrabbit/mk/index/ main/java/org/apache/jackrabbit/mk/mem/ main/java/org/apache/jackrabbit/mk/simple/ main/java/org/apache/jackrab...
Date Wed, 15 Feb 2012 15:52:53 GMT
Author: thomasm
Date: Wed Feb 15 15:52:52 2012
New Revision: 1244555

URL: http://svn.apache.org/viewvc?rev=1244555&view=rev
Log:
Rename package

Added:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/
      - copied from r1241011, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/MemoryKernelImpl.java
      - copied, changed from r1243458, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java
      - copied, changed from r1243833, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeList.java
      - copied, changed from r1241425, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListSmall.java
      - copied, changed from r1241425, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListTrie.java
      - copied, changed from r1241425, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMap.java
      - copied, changed from r1243833, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeMap.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInMongoDb.java
Removed:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeId.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeIdInline.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeMap.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeMapInDb.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/Revision.java
Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PrefixIndex.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PropertyIndex.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeId.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeIdInline.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInDb.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/Revision.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/Sync.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/NodeVersionTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/mem/MemoryNodeTest.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/MicroKernelFactory.java
Wed Feb 15 15:52:52 2012
@@ -21,7 +21,7 @@ import java.io.IOException;
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.mk.client.Client;
 import org.apache.jackrabbit.mk.fs.FileUtils;
-import org.apache.jackrabbit.mk.mem.MemoryKernelImpl;
+import org.apache.jackrabbit.mk.simple.MemoryKernelImpl;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.wrapper.IndexWrapper;
 import org.apache.jackrabbit.mk.wrapper.LogWrapper;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
Wed Feb 15 15:52:52 2012
@@ -16,7 +16,7 @@
  */
 package org.apache.jackrabbit.mk.index;
 
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 
 /**
  * An index is a lookup mechanism. It typically uses a tree to store data. It

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Indexer.java
Wed Feb 15 15:52:52 2012
@@ -21,8 +21,8 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
-import org.apache.jackrabbit.mk.mem.NodeMap;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeMap;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.util.PathUtils;
 import org.apache.jackrabbit.mk.util.SimpleLRUCache;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PrefixIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PrefixIndex.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PrefixIndex.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PrefixIndex.java
Wed Feb 15 15:52:52 2012
@@ -18,7 +18,7 @@ package org.apache.jackrabbit.mk.index;
 
 import java.util.Iterator;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 
 /**
  * An index for all values with a given prefix.

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PropertyIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PropertyIndex.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PropertyIndex.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/PropertyIndex.java
Wed Feb 15 15:52:52 2012
@@ -18,7 +18,7 @@ package org.apache.jackrabbit.mk.index;
 
 import java.util.Iterator;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 
 /**
  * A node handler that maps the property value to the key, and the path of the

Copied: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/MemoryKernelImpl.java
(from r1243458, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/MemoryKernelImpl.java?p2=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/MemoryKernelImpl.java&p1=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java&r1=1243458&r2=1244555&rev=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/MemoryKernelImpl.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/MemoryKernelImpl.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.mk.blobs.AbstractBlobStore;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeId.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeId.java?rev=1244555&r1=1241011&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeId.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeId.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 /**
  * A node id.

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeIdInline.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeIdInline.java?rev=1244555&r1=1241011&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeIdInline.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeIdInline.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 /**
  * An inline node.

Copied: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java
(from r1243833, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java?p2=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java&p1=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java&r1=1243833&r2=1244555&rev=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeImpl.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeImpl.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import java.io.OutputStream;
 import java.security.DigestOutputStream;

Copied: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeList.java
(from r1241425, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeList.java?p2=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeList.java&p1=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java&r1=1241425&r2=1244555&rev=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeList.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeList.java
Wed Feb 15 15:52:52 2012
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.Iterator;
 import org.apache.jackrabbit.mk.json.JsopWriter;
-import org.apache.jackrabbit.mk.mem.NodeImpl.ChildVisitor;
+import org.apache.jackrabbit.mk.simple.NodeImpl.ChildVisitor;
 
 /**
  * A list of child nodes.

Copied: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListSmall.java
(from r1241425, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListSmall.java?p2=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListSmall.java&p1=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java&r1=1241425&r2=1244555&rev=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListSmall.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListSmall.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -23,7 +23,7 @@ import java.util.Arrays;
 import java.util.Iterator;
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopWriter;
-import org.apache.jackrabbit.mk.mem.NodeImpl.ChildVisitor;
+import org.apache.jackrabbit.mk.simple.NodeImpl.ChildVisitor;
 import org.apache.jackrabbit.mk.util.ArrayUtils;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.util.IOUtils;

Copied: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListTrie.java
(from r1241425, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListTrie.java?p2=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListTrie.java&p1=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java&r1=1241425&r2=1244555&rev=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeListTrie.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeListTrie.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.apache.jackrabbit.mk.json.JsopWriter;
-import org.apache.jackrabbit.mk.mem.NodeImpl.ChildVisitor;
+import org.apache.jackrabbit.mk.simple.NodeImpl.ChildVisitor;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.util.IOUtils;
 

Copied: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMap.java
(from r1243833, jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeMap.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMap.java?p2=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMap.java&p1=jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeMap.java&r1=1243833&r2=1244555&rev=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/mem/NodeMap.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMap.java
Wed Feb 15 15:52:52 2012
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
-import org.apache.jackrabbit.mk.mem.NodeImpl.ChildVisitor;
+import org.apache.jackrabbit.mk.simple.NodeImpl.ChildVisitor;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 
 public class NodeMap {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInDb.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInDb.java?rev=1244555&r1=1241011&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInDb.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInDb.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
@@ -28,7 +28,7 @@ import java.util.TreeMap;
 import java.util.Map.Entry;
 import org.apache.jackrabbit.mk.fs.FilePath;
 import org.apache.jackrabbit.mk.json.JsopBuilder;
-import org.apache.jackrabbit.mk.mem.NodeImpl.ChildVisitor;
+import org.apache.jackrabbit.mk.simple.NodeImpl.ChildVisitor;
 import org.apache.jackrabbit.mk.util.Cache;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 

Added: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInMongoDb.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInMongoDb.java?rev=1244555&view=auto
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInMongoDb.java
(added)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/NodeMapInMongoDb.java
Wed Feb 15 15:52:52 2012
@@ -0,0 +1,190 @@
+/*
+ * 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.mk.simple;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.TreeMap;
+import java.util.Map.Entry;
+import org.apache.jackrabbit.mk.simple.NodeImpl.ChildVisitor;
+import org.apache.jackrabbit.mk.util.Cache;
+import org.apache.jackrabbit.mk.util.ExceptionFactory;
+import com.mongodb.BasicDBObject;
+import com.mongodb.DB;
+import com.mongodb.DBCollection;
+import com.mongodb.DBObject;
+import com.mongodb.Mongo;
+import com.mongodb.WriteConcern;
+
+/**
+ * A node map that stores data in a Mongo DB.
+ */
+public class NodeMapInMongoDb extends NodeMap implements Cache.Backend<Long, NodeImpl>
{
+
+    private static final String DB = "ds";
+    private static final String NODES_COLLECTION = "nodes";
+    private static final String SETTINGS_COLLECTION = "settings";
+    private static final String KEY_FIELD = "key";
+    private static final String DATA_FIELD = "data";
+
+    final HashMap<Long, NodeImpl> temp = new HashMap<Long, NodeImpl>();
+    private final TreeMap<String, String> properties = new TreeMap<String, String>();
+    private final Cache<Long, NodeImpl> cache = Cache.newInstance(this, 10 * 1024 *
1024);
+    private final HashMap<Long, Long> pos = new HashMap<Long, Long>();
+    private long nextId;
+    private NodeImpl root = new NodeImpl(this, 0);
+
+    private Mongo con;
+    private DB db;
+    private DBCollection nodesStore;
+    private DBCollection settingsStore;
+
+    NodeMapInMongoDb(String dir) {
+        try {
+            con = new Mongo();
+            db = con.getDB(DB);
+            db.setWriteConcern(WriteConcern.SAFE);
+            nodesStore = db.getCollection(NODES_COLLECTION);
+            nodesStore.ensureIndex(
+                    new BasicDBObject(KEY_FIELD, 1),
+                    new BasicDBObject("unique", true));
+
+            settingsStore = db.getCollection(SETTINGS_COLLECTION);
+            settingsStore.ensureIndex(
+                    new BasicDBObject(KEY_FIELD, 1),
+                    new BasicDBObject("unique", true));
+
+            BasicDBObject k = new BasicDBObject(KEY_FIELD, "root");
+            DBObject dataObject = settingsStore.findOne(k);
+            if (dataObject != null) {
+                root.setId(NodeId.get(Long.parseLong(dataObject.get(DATA_FIELD).toString())));
+            }
+
+        } catch (Exception e) {
+            throw ExceptionFactory.convert(e);
+        }
+    }
+
+    public synchronized NodeId addNode(NodeImpl node) {
+        return addNode(node, true);
+    }
+
+    private NodeId addNode(NodeImpl node, boolean allowInline) {
+        NodeId x = node.getId();
+        if (x == null) {
+            if (allowInline && node.getDescendantInlineCount() < descendantInlineCount)
{
+                x = new NodeIdInline(node);
+            } else {
+                long t = -temp.size() - 1;
+                temp.put(t, node);
+                x = NodeId.get(t);
+            }
+            node.setId(x);
+        }
+        return x;
+    }
+
+    public NodeImpl getNode(long x) {
+        return x < 0 ? temp.get(x) : cache.get(x);
+    }
+
+    public NodeImpl load(Long key) {
+        try {
+            BasicDBObject k = new BasicDBObject(KEY_FIELD, key);
+            DBObject dataObject = nodesStore.findOne(k);
+            String n = (String) dataObject.get(DATA_FIELD);
+            return NodeImpl.fromString(this, n);
+        } catch (Exception e) {
+            throw ExceptionFactory.convert(e);
+        }
+    }
+
+    public synchronized NodeId commit(NodeImpl newRoot) {
+        addNode(newRoot, false);
+        try {
+            final NodeMap map = this;
+            final ArrayList<Long> list = new ArrayList<Long>();
+            newRoot.visit(new ChildVisitor() {
+                public void accept(NodeId childId) {
+                    if (childId.getLong() < 0) {
+                        NodeImpl t = temp.get(childId.getLong());
+                        t.visit(this);
+                        list.add(childId.getLong());
+                        if (hash) {
+                            t.getHash();
+                        }
+                    } else if (childId.isInline()) {
+                        NodeImpl t = childId.getNode(map);
+                        t.visit(this);
+                        if (hash) {
+                            t.getHash();
+                        }
+                    }
+                }
+            });
+            list.add(newRoot.getId().getLong());
+            ArrayList<DBObject> add = new ArrayList<DBObject>();
+            for (Long id : list) {
+                NodeImpl n = temp.get(id);
+                long newId;
+                newId = nextId++;
+                n.setId(NodeId.get(newId));
+                pos.put(id, newId);
+                BasicDBObject dataObject = new BasicDBObject(KEY_FIELD, newId);
+                dataObject.append(DATA_FIELD, n.asString());
+                add.add(dataObject);
+                cache.put(n.getId().getLong(), n);
+            }
+            nodesStore.insert(add);
+            String r = String.valueOf(newRoot.getId().getLong());
+            settingsStore.insert(new BasicDBObject(KEY_FIELD, r));
+            temp.clear();
+            pos.clear();
+        } catch (Exception e) {
+            throw ExceptionFactory.convert(e);
+        }
+        root = newRoot;
+        return root.getId();
+    }
+
+    public NodeId getId(NodeId id) {
+        long x = id.getLong();
+        return (x > 0 || !pos.containsKey(x)) ? id : NodeId.get(pos.get(x));
+    }
+
+    public NodeId getRootId() {
+        return root.getId();
+    }
+
+    public NodeImpl getInfo(String path) {
+        NodeImpl n = new NodeImpl(this, 0);
+        for (Entry<String, String> e : properties.entrySet()) {
+            n.setProperty("property." + e.getKey(), e.getValue());
+        }
+        n.setProperty("cache.size", "" + cache.size());
+        n.setProperty("cache.memoryUsed", "" + cache.getMemoryUsed());
+        n.setProperty("cache.memoryMax", "" + cache.getMemoryMax());
+        n.setProperty("nextId", "" + nextId);
+        n.setProperty("root", "" + root.getId());
+        return n;
+    }
+
+    public synchronized void close() {
+        con.close();
+    }
+
+}

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/Revision.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/Revision.java?rev=1244555&r1=1241011&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/Revision.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/simple/Revision.java
Wed Feb 15 15:52:52 2012
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.mk.mem;
+package org.apache.jackrabbit.mk.simple;
 
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopWriter;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/Sync.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/Sync.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/Sync.java (original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/util/Sync.java Wed
Feb 15 15:52:52 2012
@@ -18,7 +18,7 @@ package org.apache.jackrabbit.mk.util;
 
 import java.util.Iterator;
 import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 
 /**
  * Traverse the nodes in two repositories / revisions / nodes in order to

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/IndexWrapper.java
Wed Feb 15 15:52:52 2012
@@ -28,8 +28,8 @@ import org.apache.jackrabbit.mk.index.Pr
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopStream;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
-import org.apache.jackrabbit.mk.mem.NodeMap;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeMap;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.util.PathUtils;
 

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/SecurityWrapper.java
Wed Feb 15 15:52:52 2012
@@ -24,8 +24,8 @@ import org.apache.jackrabbit.mk.json.Jso
 import org.apache.jackrabbit.mk.json.JsopStream;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.apache.jackrabbit.mk.json.JsopWriter;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
-import org.apache.jackrabbit.mk.mem.NodeMap;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeMap;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.util.PathUtils;
 import org.apache.jackrabbit.mk.util.SimpleLRUCache;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/wrapper/VirtualRepositoryWrapper.java
Wed Feb 15 15:52:52 2012
@@ -27,8 +27,8 @@ import org.apache.jackrabbit.mk.json.Jso
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.apache.jackrabbit.mk.json.JsopWriter;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
-import org.apache.jackrabbit.mk.mem.NodeMap;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeMap;
 import org.apache.jackrabbit.mk.util.ExceptionFactory;
 import org.apache.jackrabbit.mk.util.PathUtils;
 

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/MultiMkTestBase.java
Wed Feb 15 15:52:52 2012
@@ -26,8 +26,8 @@ import org.apache.jackrabbit.mk.fs.FileU
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.JsopReader;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
-import org.apache.jackrabbit.mk.mem.NodeMap;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeMap;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.runners.Parameterized.Parameters;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/hash/HashTest.java
Wed Feb 15 15:52:52 2012
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 import java.util.Arrays;
 import org.apache.jackrabbit.mk.MultiMkTestBase;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 import org.apache.jackrabbit.mk.util.IOUtilsTest;
 import org.junit.After;
 import org.junit.Test;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
Wed Feb 15 15:52:52 2012
@@ -19,7 +19,7 @@ import org.apache.jackrabbit.mk.MultiMkT
 import org.apache.jackrabbit.mk.json.JsopBuilder;
 import org.apache.jackrabbit.mk.json.fast.Jsop;
 import org.apache.jackrabbit.mk.json.fast.JsopObject;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 import org.apache.jackrabbit.mk.util.NodeCreator;
 import org.junit.After;
 import org.junit.Test;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/ManyRevisionsTest.java
Wed Feb 15 15:52:52 2012
@@ -22,7 +22,7 @@ import org.apache.jackrabbit.mk.MultiMkT
 import org.apache.jackrabbit.mk.json.fast.Jsop;
 import org.apache.jackrabbit.mk.json.fast.JsopArray;
 import org.apache.jackrabbit.mk.json.fast.JsopObject;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 import org.apache.jackrabbit.mk.util.StopWatch;
 import org.junit.Before;
 import org.junit.Test;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/NodeVersionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/NodeVersionTest.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/NodeVersionTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/NodeVersionTest.java
Wed Feb 15 15:52:52 2012
@@ -19,7 +19,7 @@ package org.apache.jackrabbit.mk.large;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import org.apache.jackrabbit.mk.MultiMkTestBase;
-import org.apache.jackrabbit.mk.mem.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/mem/MemoryNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/mem/MemoryNodeTest.java?rev=1244555&r1=1244554&r2=1244555&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/mem/MemoryNodeTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/mem/MemoryNodeTest.java
Wed Feb 15 15:52:52 2012
@@ -17,6 +17,9 @@
 package org.apache.jackrabbit.mk.mem;
 
 import junit.framework.Assert;
+import org.apache.jackrabbit.mk.simple.NodeId;
+import org.apache.jackrabbit.mk.simple.NodeImpl;
+import org.apache.jackrabbit.mk.simple.NodeMap;
 import org.junit.Test;
 
 /**



Mime
View raw message