jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1476109 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
Date Fri, 26 Apr 2013 08:50:13 GMT
Author: alexparvulescu
Date: Fri Apr 26 08:50:13 2013
New Revision: 1476109

URL: http://svn.apache.org/r1476109
Log:
OAK-734 Refactor indexing code to use Editors

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/Oak.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.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=1476109&r1=1476108&r2=1476109&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 Apr
26 08:50:13 2013
@@ -82,7 +82,7 @@ public class Oak {
 
     private final List<QueryIndexProvider> queryIndexProviders = newArrayList();
 
-    private final List<IndexEditorProvider> indexHookProviders = newArrayList();
+    private final List<IndexEditorProvider> indexEditorProviders = newArrayList();
 
     private final List<CommitHook> commitHooks = newArrayList();
 
@@ -148,7 +148,7 @@ public class Oak {
      */
     @Nonnull
     public Oak with(@Nonnull IndexEditorProvider provider) {
-        indexHookProviders.add(provider);
+        indexEditorProviders.add(provider);
         return this;
     }
 
@@ -243,8 +243,8 @@ public class Oak {
     }
 
     public ContentRepository createContentRepository() {
-        IndexEditorProvider indexHooks = CompositeIndexEditorProvider.compose(indexHookProviders);
-        OakInitializer.initialize(store, new CompositeInitializer(initializers), indexHooks);
+        IndexEditorProvider indexEditors = CompositeIndexEditorProvider.compose(indexEditorProviders);
+        OakInitializer.initialize(store, new CompositeInitializer(initializers), indexEditors);
 
         QueryIndexProvider indexProvider = CompositeQueryIndexProvider.compose(queryIndexProviders);
 
@@ -263,11 +263,11 @@ public class Oak {
                             }
                         });
         OakInitializer.initialize(workspaceInitializers, store,
-                defaultWorkspaceName, indexHooks, indexProvider,
+                defaultWorkspaceName, indexEditors, indexProvider,
                 CompositeHook.compose(initHooks));
 
         // add index hooks later to prevent the OakInitializer to do excessive indexing
-        with(new IndexUpdateProvider(indexHooks));
+        with(new IndexUpdateProvider(indexEditors));
         with(new EventQueueWriterProvider());
         withEditorHook();
         CommitHook commitHook = CompositeHook.compose(commitHooks);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java?rev=1476109&r1=1476108&r2=1476109&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/lifecycle/OakInitializer.java
Fri Apr 26 08:50:13 2013
@@ -37,12 +37,12 @@ public final class OakInitializer {
 
     public static void initialize(@Nonnull NodeStore store,
                                   @Nonnull RepositoryInitializer initializer,
-                                  @Nonnull IndexEditorProvider indexHook) {
+                                  @Nonnull IndexEditorProvider indexEditor) {
         NodeStoreBranch branch = store.branch();
         NodeState before = branch.getHead();
         branch.setRoot(initializer.initialize(before));
         try {
-            branch.merge(new EditorHook(new IndexUpdateProvider(indexHook)));
+            branch.merge(new EditorHook(new IndexUpdateProvider(indexEditor)));
         } catch (CommitFailedException e) {
             throw new RuntimeException(e);
         }
@@ -51,7 +51,7 @@ public final class OakInitializer {
     public static void initialize(@Nonnull Iterable<WorkspaceInitializer> initializer,
                                   @Nonnull NodeStore store,
                                   @Nonnull String workspaceName,
-                                  @Nonnull IndexEditorProvider indexHook,
+                                  @Nonnull IndexEditorProvider indexEditor,
                                   @Nonnull QueryIndexProvider indexProvider,
                                   @Nonnull CommitHook commitHook) {
         NodeStoreBranch branch = store.branch();
@@ -61,7 +61,7 @@ public final class OakInitializer {
         }
         branch.setRoot(root);
         try {
-            branch.merge(new EditorHook(new IndexUpdateProvider(indexHook)));
+            branch.merge(new EditorHook(new IndexUpdateProvider(indexEditor)));
         } catch (CommitFailedException e) {
             throw new RuntimeException(e);
         }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java?rev=1476109&r1=1476108&r2=1476109&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java (original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java Fri
Apr 26 08:50:13 2013
@@ -96,8 +96,8 @@ public class Jcr {
     }
 
     @Nonnull
-    public final Jcr with(@Nonnull IndexEditorProvider indexHookProvider) {
-        oak.with(checkNotNull(indexHookProvider));
+    public final Jcr with(@Nonnull IndexEditorProvider indexEditorProvider) {
+        oak.with(checkNotNull(indexEditorProvider));
         return this;
     }
 



Mime
View raw message