org.hibernate.search.backend
Class BackendFactory

java.lang.Object
  extended by org.hibernate.search.backend.BackendFactory

public class BackendFactory
extends Object

Author:
Sanne Grinovero (C) 2011 Red Hat Inc.

Constructor Summary
BackendFactory()
           
 
Method Summary
static ExecutorService buildWorkersExecutor(Properties properties, String indexManagerName)
          Builds an ExecutorService to run backend work.
static BackendQueueProcessor createBackend(DirectoryBasedIndexManager indexManager, WorkerBuildContext context, Properties properties)
           
static LuceneWorkSerializer createSerializer(String indexName, Properties cfg, WorkerBuildContext buildContext)
           
static int getWorkerQueueSize(Properties properties)
           
static int getWorkerThreadPoolSize(Properties properties)
           
static boolean isConfiguredAsSync(Properties properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackendFactory

public BackendFactory()
Method Detail

createBackend

public static BackendQueueProcessor createBackend(DirectoryBasedIndexManager indexManager,
                                                  WorkerBuildContext context,
                                                  Properties properties)

isConfiguredAsSync

public static boolean isConfiguredAsSync(Properties properties)
Parameters:
properties - the configuration to parse
Returns:
true if the configuration uses sync indexing

buildWorkersExecutor

public static ExecutorService buildWorkersExecutor(Properties properties,
                                                   String indexManagerName)
Builds an ExecutorService to run backend work.

Parameters:
properties - Might optionally contain configuration options for the ExecutorService
indexManagerName - The indexManager going to be linked to this ExecutorService
Returns:
null if the work needs execution in sync

getWorkerThreadPoolSize

public static int getWorkerThreadPoolSize(Properties properties)

getWorkerQueueSize

public static int getWorkerQueueSize(Properties properties)

createSerializer

public static LuceneWorkSerializer createSerializer(String indexName,
                                                    Properties cfg,
                                                    WorkerBuildContext buildContext)


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved