Author: chetanm
Date: Thu Sep 15 07:16:21 2016
New Revision: 1760841

URL: http://svn.apache.org/viewvc?rev=1760841&view=rev
Log:
OAK-4412 - Lucene hybrid index

Builder method for async

Modified:
    
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/IndexDefinitionBuilder.java

Modified: 
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/IndexDefinitionBuilder.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/IndexDefinitionBuilder.java?rev=1760841&r1=1760840&r2=1760841&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/IndexDefinitionBuilder.java
 (original)
+++ 
jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/IndexDefinitionBuilder.java
 Thu Sep 15 07:16:21 2016
@@ -37,6 +37,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
+import static com.google.common.base.Preconditions.checkNotNull;
 import static java.util.Arrays.asList;
 import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
 import static org.apache.jackrabbit.JcrConstants.NT_UNSTRUCTURED;
@@ -76,6 +77,17 @@ public final class IndexDefinitionBuilde
         return this;
     }
 
+    public IndexDefinitionBuilder codec(String codecName){
+        tree.setProperty(LuceneIndexConstants.CODEC_NAME, 
checkNotNull(codecName));
+        return this;
+    }
+
+    public IndexDefinitionBuilder async(String ... asyncVals){
+        tree.removeProperty("async");
+        tree.setProperty("async", asList(asyncVals), STRINGS);
+        return this;
+    }
+
     public NodeState build(){
         return builder.getNodeState();
     }


Reply via email to