You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2013/12/06 17:54:43 UTC

svn commit: r1548598 - /stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java

Author: rwesten
Date: Fri Dec  6 16:54:43 2013
New Revision: 1548598

URL: http://svn.apache.org/r1548598
Log:
STANBOL-1232: added getter/setter for setting the FST TreadPool size. The size is now initialised with the default (4)

Modified:
    stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java

Modified: stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
URL: http://svn.apache.org/viewvc/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java?rev=1548598&r1=1548597&r2=1548598&view=diff
==============================================================================
--- stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java (original)
+++ stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java Fri Dec  6 16:54:43 2013
@@ -244,7 +244,7 @@ public class SolrYardIndexingDestination
      * The number of threads used to build FST models. 
      * Set in {@link #setConfiguration(Map)}
      */
-    private int fstThreads;
+    private int fstThreads = DEFAULT_FST_THREADS;
 
     private NamespacePrefixService  namespacePrefixService;
     
@@ -550,6 +550,20 @@ public class SolrYardIndexingDestination
         this.fstConfigs = Collections.unmodifiableList(parseFstConfig(lines));
     }
     /**
+     * Setter for the ThreadPool used to create FST models
+     * @param size
+     */
+    public void setFstThreads(int size){
+        if(size < 1){
+            this.fstThreads = DEFAULT_FST_THREADS;
+        } else {
+            this.fstThreads = size;
+        }
+    }
+    public int getFstThreads() {
+        return fstThreads;
+    }
+    /**
      * Getter for the FST models that are created in the {@link #finalise()}
      * phase
      * @return the FST c