jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1475788 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/plugins/index/property/ test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/
Date Thu, 25 Apr 2013 14:13:14 GMT
Author: alexparvulescu
Date: Thu Apr 25 14:13:13 2013
New Revision: 1475788

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

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
  (contents, props changed)
      - copied, changed from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2Index.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java
  (contents, props changed)
      - copied, changed from r1475754, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHook.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java
  (contents, props changed)
      - copied, changed from r1475754, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
  (contents, props changed)
      - copied, changed from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
  (contents, props changed)
      - copied, changed from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
  (contents, props changed)
      - copied, changed from r1475754, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookUpdate.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategyTest.java

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
(from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2Index.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2Index.java&r1=1475736&r2=1475788&rev=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2Index.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
Thu Apr 25 14:13:13 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
@@ -77,9 +77,9 @@ import com.google.common.base.Charsets;
  * </pre>
  * 
  * @see QueryIndex
- * @see Property2IndexLookup
+ * @see PropertyIndexLookup
  */
-class Property2Index implements QueryIndex {
+class PropertyIndex implements QueryIndex {
 
     // TODO the max string length should be removed, or made configurable
     private static final int MAX_STRING_LENGTH = 100; 
@@ -109,7 +109,7 @@ class Property2Index implements QueryInd
 
     @Override
     public double getCost(Filter filter, NodeState root) {
-        Property2IndexLookup lookup = new Property2IndexLookup(root);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
         for (PropertyRestriction pr : filter.getPropertyRestrictions()) {
             String propertyName = PathUtils.getName(pr.propertyName);
             // TODO support indexes on a path
@@ -133,7 +133,7 @@ class Property2Index implements QueryInd
     public Cursor query(Filter filter, NodeState root) {
         Iterable<String> paths = null;
 
-        Property2IndexLookup lookup = new Property2IndexLookup(root);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
         int depth = 1;
         for (PropertyRestriction pr : filter.getPropertyRestrictions()) {
             String propertyName = PathUtils.getName(pr.propertyName);
@@ -167,7 +167,7 @@ class Property2Index implements QueryInd
     @Override
     public String getPlan(Filter filter, NodeState root) {
         StringBuilder buff = new StringBuilder("p2");
-        Property2IndexLookup lookup = new Property2IndexLookup(root);
+        PropertyIndexLookup lookup = new PropertyIndexLookup(root);
         for (PropertyRestriction pr : filter.getPropertyRestrictions()) {
             String propertyName = PathUtils.getName(pr.propertyName);
             // TODO support indexes on a path

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndex.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java
(from r1475754, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHook.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHook.java&r1=1475754&r2=1475788&rev=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHook.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java
Thu Apr 25 14:13:13 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import static com.google.common.collect.Iterables.addAll;
 import static com.google.common.collect.Lists.newArrayList;
@@ -26,7 +26,7 @@ import static org.apache.jackrabbit.oak.
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider.TYPE;
+import static org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider.TYPE;
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_NODE_TYPES;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.OAK_MIXIN_SUBTYPES;
@@ -44,8 +44,8 @@ import org.apache.jackrabbit.oak.api.Com
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.index.IndexEditor;
-import org.apache.jackrabbit.oak.plugins.index.p2.strategy.ContentMirrorStoreStrategy;
-import org.apache.jackrabbit.oak.plugins.index.p2.strategy.IndexStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexStoreStrategy;
 import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState;
 import org.apache.jackrabbit.oak.spi.commit.Editor;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
@@ -56,15 +56,15 @@ import com.google.common.collect.Lists;
 
 /**
  * {@link IndexEditor} implementation that is responsible for keeping the
- * {@link Property2Index} up to date.
+ * {@link PropertyIndex} up to date.
  * <br>
  * There is a tree of PropertyIndexDiff objects, each object represents the
  * changes at a given node.
  * 
- * @see Property2Index
- * @see Property2IndexLookup
+ * @see PropertyIndex
+ * @see PropertyIndexLookup
  */
-class Property2IndexHook implements IndexEditor, Closeable {
+class PropertyIndexEditor implements IndexEditor, Closeable {
 
     protected static String propertyNames = "propertyNames";
 
@@ -75,7 +75,7 @@ class Property2IndexHook implements Inde
     /**
      * The parent (null if this is the root node).
      */
-    private final Property2IndexHook parent;
+    private final PropertyIndexEditor parent;
 
     /**
      * The node (can be null in the case of a deleted node).
@@ -92,29 +92,29 @@ class Property2IndexHook implements Inde
      */
     private String path;
 
-    private final List<Property2IndexHookUpdate> updates = Lists.newArrayList();
+    private final List<PropertyIndexUpdate> updates = Lists.newArrayList();
 
     /**
      * The map of known indexes. Key: the property name. Value: the list of
      * indexes (it is possible to have multiple indexes for the same property
      * name).
      */
-    private final Map<String, List<Property2IndexHookUpdate>> indexMap;
+    private final Map<String, List<PropertyIndexUpdate>> indexMap;
 
     /**
      * The {@code /jcr:system/jcr:nodeTypes} subtree.
      */
     private final NodeState types;
 
-    public Property2IndexHook(NodeBuilder builder) {
+    public PropertyIndexEditor(NodeBuilder builder) {
         this(null, builder, null, "/");
     }
 
-    private Property2IndexHook(Property2IndexHook parent, String nodeName) {
+    private PropertyIndexEditor(PropertyIndexEditor parent, String nodeName) {
         this(parent, getChildNode(parent.node, nodeName), nodeName, null);
     }
 
-    private Property2IndexHook(Property2IndexHook parent, NodeBuilder node,
+    private PropertyIndexEditor(PropertyIndexEditor parent, NodeBuilder node,
             String nodeName, String path) {
         this.parent = parent;
         this.node = node;
@@ -122,7 +122,7 @@ class Property2IndexHook implements Inde
         this.path = path;
 
         if (parent == null) {
-            this.indexMap = new HashMap<String, List<Property2IndexHookUpdate>>();
+            this.indexMap = new HashMap<String, List<PropertyIndexUpdate>>();
             if (node.hasChildNode(JCR_SYSTEM)) {
                 NodeBuilder typeNB = node.getChildNode(JCR_SYSTEM)
                         .getChildNode(JCR_NODE_TYPES);
@@ -159,13 +159,13 @@ class Property2IndexHook implements Inde
      *            the property name
      * @return the indexes
      */
-    private Iterable<Property2IndexHookUpdate> getIndexes(String propertyName) {
-        List<Property2IndexHookUpdate> indexes = indexMap.get(propertyName);
+    private Iterable<PropertyIndexUpdate> getIndexes(String propertyName) {
+        List<PropertyIndexUpdate> indexes = indexMap.get(propertyName);
         if (indexes == null) {
             return ImmutableList.of();
         }
-        List<Property2IndexHookUpdate> filtered = new ArrayList<Property2IndexHookUpdate>();
-        for (Property2IndexHookUpdate pi : indexes) {
+        List<PropertyIndexUpdate> filtered = new ArrayList<PropertyIndexUpdate>();
+        for (PropertyIndexUpdate pi : indexes) {
             if (node == null || pi.matchesNodeType(node)) {
                 filtered.add(pi);
             }
@@ -200,21 +200,21 @@ class Property2IndexHook implements Inde
         Iterable<String> propertyNames = ps != null ? ps.getValue(Type.NAMES)
                 : ImmutableList.of(indexName);
         for (String pname : propertyNames) {
-            List<Property2IndexHookUpdate> list = this.indexMap.get(pname);
+            List<PropertyIndexUpdate> list = this.indexMap.get(pname);
             if (list == null) {
                 list = newArrayList();
                 this.indexMap.put(pname, list);
             }
             boolean exists = false;
             String localPath = getPath();
-            for (Property2IndexHookUpdate piu : list) {
+            for (PropertyIndexUpdate piu : list) {
                 if (piu.matches(localPath, primaryTypes, mixinTypes)) {
                     exists = true;
                     break;
                 }
             }
             if (!exists) {
-                Property2IndexHookUpdate update = new Property2IndexHookUpdate(
+                PropertyIndexUpdate update = new PropertyIndexUpdate(
                         getPath(), node.child(INDEX_DEFINITIONS_NAME).child(indexName),
                         store, primaryTypes, mixinTypes);
                 list.add(update);
@@ -253,14 +253,14 @@ class Property2IndexHook implements Inde
     @Override
     public void leave(NodeState before, NodeState after)
             throws CommitFailedException {
-        for (Property2IndexHookUpdate update : updates) {
+        for (PropertyIndexUpdate update : updates) {
             update.checkUniqueKeys();
         }
     }
 
     @Override
     public void propertyAdded(PropertyState after) throws CommitFailedException {
-        for (Property2IndexHookUpdate update : getIndexes(after.getName())) {
+        for (PropertyIndexUpdate update : getIndexes(after.getName())) {
             update.insert(getPath(), after);
         }
     }
@@ -268,7 +268,7 @@ class Property2IndexHook implements Inde
     @Override
     public void propertyChanged(PropertyState before, PropertyState after)
             throws CommitFailedException {
-        for (Property2IndexHookUpdate update : getIndexes(after.getName())) {
+        for (PropertyIndexUpdate update : getIndexes(after.getName())) {
             update.remove(getPath(), before);
             update.insert(getPath(), after);
         }
@@ -277,7 +277,7 @@ class Property2IndexHook implements Inde
     @Override
     public void propertyDeleted(PropertyState before)
             throws CommitFailedException {
-        for (Property2IndexHookUpdate update : getIndexes(before.getName())) {
+        for (PropertyIndexUpdate update : getIndexes(before.getName())) {
             update.remove(getPath(), before);
         }
     }
@@ -291,7 +291,7 @@ class Property2IndexHook implements Inde
     @Override
     public Editor childNodeChanged(String name, NodeState before,
             NodeState after) throws CommitFailedException {
-        return new Property2IndexHook(this, name);
+        return new PropertyIndexEditor(this, name);
     }
 
     @Override

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java
(from r1475754, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookProvider.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookProvider.java&r1=1475754&r2=1475788&rev=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java
Thu Apr 25 14:13:13 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Service;
@@ -23,22 +23,22 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 
 /**
- * Service that provides PropertyIndex based IndexHooks.
+ * Service that provides PropertyIndex based editors.
  * 
- * @see Property2IndexHook
+ * @see PropertyIndexEditor
  * @see IndexEditorProvider
  * 
  */
 @Component
 @Service(IndexEditorProvider.class)
-public class Property2IndexHookProvider implements IndexEditorProvider {
+public class PropertyIndexEditorProvider implements IndexEditorProvider {
 
     public static final String TYPE = "p2";
 
     @Override
     public Editor getIndexEditor(String type, NodeBuilder builder) {
         if (TYPE.equals(type)) {
-            return new Property2IndexHook(builder);
+            return new PropertyIndexEditor(builder);
         }
         return null;
     }

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexEditorProvider.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
(from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java&r1=1475736&r2=1475788&rev=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexLookup.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
Thu Apr 25 14:13:13 2013
@@ -14,14 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import static com.google.common.collect.Iterables.contains;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.DECLARING_NODE_TYPES;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.PROPERTY_NAMES;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
-import static org.apache.jackrabbit.oak.plugins.index.p2.Property2IndexHookProvider.TYPE;
+import static org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider.TYPE;
 
 import java.util.Iterator;
 import java.util.List;
@@ -33,8 +33,8 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.api.PropertyValue;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.commons.PathUtils;
-import org.apache.jackrabbit.oak.plugins.index.p2.strategy.ContentMirrorStoreStrategy;
-import org.apache.jackrabbit.oak.plugins.index.p2.strategy.IndexStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexStoreStrategy;
 import org.apache.jackrabbit.oak.spi.query.Filter;
 import org.apache.jackrabbit.oak.spi.state.ChildNodeEntry;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -49,13 +49,13 @@ import org.apache.jackrabbit.oak.spi.sta
  * <code>
  * {
  *     NodeState state = ... // get a node state
- *     Property2IndexLookup lookup = new Property2IndexLookup(state);
+ *     PropertyIndexLookup lookup = new PropertyIndexLookup(state);
  *     Set<String> hits = lookup.find("foo", PropertyValues.newString("xyz"));
  * }
  * </code>
  * </pre>
  */
-public class Property2IndexLookup {
+public class PropertyIndexLookup {
 
     private static final int MAX_COST = 100;
 
@@ -63,7 +63,7 @@ public class Property2IndexLookup {
 
     private final NodeState root;
 
-    public Property2IndexLookup(NodeState root) {
+    public PropertyIndexLookup(NodeState root) {
         this.root = root;
     }
 
@@ -108,7 +108,7 @@ public class Property2IndexLookup {
         if (state == null) {
             throw new IllegalArgumentException("No index for " + propertyName);
         }
-        List<String> values = value == null ? null : Property2Index.encode(value);
+        List<String> values = value == null ? null : PropertyIndex.encode(value);
         return store.query(filter, propertyName, state, values);
     }
 
@@ -122,7 +122,7 @@ public class Property2IndexLookup {
         if (state == null) {
             return Double.POSITIVE_INFINITY;
         }
-        List<String> it = value == null ? null : Property2Index.encode(value);
+        List<String> it = value == null ? null : PropertyIndex.encode(value);
         return store.count(state, it, MAX_COST);
     }
 

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexLookup.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
(from r1475736, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexProvider.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexProvider.java&r1=1475736&r2=1475788&rev=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
Thu Apr 25 14:13:13 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import java.util.List;
 
@@ -34,14 +34,14 @@ import com.google.common.collect.Immutab
  * Even if there are multiple index definitions, there is only actually one
  * PropertyIndex instance, which is used for all indexes.
  * 
- * @see Property2Index
+ * @see PropertyIndex
  */
 @Component
 @Service(QueryIndexProvider.class)
-public class Property2IndexProvider implements QueryIndexProvider {
+public class PropertyIndexProvider implements QueryIndexProvider {
 
     @Override @Nonnull
     public List<QueryIndex> getQueryIndexes(NodeState state) {
-        return ImmutableList.<QueryIndex>of(new Property2Index());
+        return ImmutableList.<QueryIndex>of(new PropertyIndex());
     }
 }

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexProvider.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
(from r1475754, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookUpdate.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookUpdate.java&r1=1475754&r2=1475788&rev=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/p2/Property2IndexHookUpdate.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
Thu Apr 25 14:13:13 2013
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2;
+package org.apache.jackrabbit.oak.plugins.index.property;
 
 import static org.apache.jackrabbit.JcrConstants.JCR_MIXINTYPES;
 import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
-import static org.apache.jackrabbit.oak.plugins.index.p2.Property2Index.encode;
+import static org.apache.jackrabbit.oak.plugins.index.property.PropertyIndex.encode;
 
 import java.util.Collections;
 import java.util.Set;
@@ -28,7 +28,7 @@ import javax.jcr.PropertyType;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Type;
-import org.apache.jackrabbit.oak.plugins.index.p2.strategy.IndexStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexStoreStrategy;
 import org.apache.jackrabbit.oak.spi.query.PropertyValues;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -40,7 +40,7 @@ import com.google.common.collect.Sets;
 /**
  * Takes care of applying the updates to the index content.
  */
-class Property2IndexHookUpdate {
+class PropertyIndexUpdate {
 
     private final IndexStoreStrategy store;
 
@@ -75,7 +75,7 @@ class Property2IndexHookUpdate {
 
     private final Set<String> modifiedKeys = Sets.newHashSet();
 
-    public Property2IndexHookUpdate(
+    public PropertyIndexUpdate(
             String path, NodeBuilder node, IndexStoreStrategy store,
             Set<String> primaryTypes, Set<String> mixinTypes) {
         this.path = path;

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/PropertyIndexUpdate.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategyTest.java?rev=1475788&r1=1475787&r2=1475788&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategyTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/strategy/ContentMirrorStoreStrategyTest.java
Thu Apr 25 14:13:13 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.oak.plugins.index.p2.strategy;
+package org.apache.jackrabbit.oak.plugins.index.property.strategy;
 
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
 
@@ -22,6 +22,8 @@ import java.util.Collections;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.commons.PathUtils;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.ContentMirrorStoreStrategy;
+import org.apache.jackrabbit.oak.plugins.index.property.strategy.IndexStoreStrategy;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.junit.Assert;



Mime
View raw message