jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1446558 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
Date Fri, 15 Feb 2013 12:47:12 GMT
Author: jukka
Date: Fri Feb 15 12:47:12 2013
New Revision: 1446558

URL: http://svn.apache.org/r1446558
Log:
OAK-627: Move CommitHook(s) from KernelNodeStore to RootImpl

Use NodeStore as the storage abstraction in Oak.java

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java?rev=1446558&r1=1446557&r2=1446558&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java Fri Feb
15 12:47:12 2013
@@ -70,7 +70,7 @@ public class Oak {
      */
     public static final String DEFAULT_WORKSPACE_NAME = "default";
 
-    private final MicroKernel kernel;
+    private final NodeStore store;
 
     private final List<RepositoryInitializer> initializers = newArrayList();
 
@@ -89,8 +89,12 @@ public class Oak {
 
     private String defaultWorkspaceName = DEFAULT_WORKSPACE_NAME;
 
+    public Oak(NodeStore store) {
+        this.store = checkNotNull(store);
+    }
+
     public Oak(MicroKernel kernel) {
-        this.kernel = kernel;
+        this(new KernelNodeStore(checkNotNull(kernel)));
     }
 
     public Oak() {
@@ -246,8 +250,6 @@ public class Oak {
     }
 
     public ContentRepository createContentRepository() {
-        NodeStore store = new KernelNodeStore(kernel);
-
         IndexHookProvider indexHooks = CompositeIndexHookProvider
                 .compose(indexHookProviders);
         OakInitializer.initialize(store,



Mime
View raw message