Examples of LuceneWorkVisitor


Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  public void initialize(Properties props, SearchFactoryImplementor searchFactoryImplementor) {
    this.searchFactoryImp = searchFactoryImplementor;
    for (DirectoryProvider dp : searchFactoryImplementor.getDirectoryProviders() ) {
      Workspace w = new Workspace( searchFactoryImplementor, dp );
      LuceneWorkVisitor visitor = new LuceneWorkVisitor( w );
      visitorsMap.put( dp, visitor );
    }
  }
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  LuceneBackendResources(WorkerBuildContext context, DirectoryBasedIndexManager indexManager, Properties props, AbstractWorkspaceImpl workspace) {
    this.indexName = indexManager.getIndexName();
    this.errorHandler = context.getErrorHandler();
    this.workspace = workspace;
    this.visitor = new LuceneWorkVisitor( workspace );
    this.maxQueueLength = CommonPropertiesParse.extractMaxQueueSize( indexName, props );
    this.queueingExecutor = Executors.newFixedThreadPool( 1, "Index updates queue processor for index " + indexName, maxQueueLength );
    this.workersExecutor = BackendFactory.buildWorkersExecutor( props, indexName );
    ReentrantReadWriteLock readWriteLock = new ReentrantReadWriteLock();
    readLock = readWriteLock.readLock();
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  private LuceneBackendResources(LuceneBackendResources previous) {
    this.indexName = previous.indexName;
    this.errorHandler = previous.errorHandler;
    this.workspace = previous.workspace;
    this.visitor = new LuceneWorkVisitor( workspace );
    this.maxQueueLength = previous.maxQueueLength;
    this.queueingExecutor = previous.queueingExecutor;
    this.workersExecutor = previous.workersExecutor;
    this.readLock = previous.readLock;
    this.writeLock = previous.writeLock;
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

 
  LuceneBackendResources(WorkerBuildContext context, DirectoryBasedIndexManager indexManager, Properties props, AbstractWorkspaceImpl workspace) {
    this.indexName = indexManager.getIndexName();
    this.errorHandler = context.getErrorHandler();
    this.workspace = workspace;
    this.visitor = new LuceneWorkVisitor( workspace );
    this.maxQueueLength = CommonPropertiesParse.extractMaxQueueSize( indexName, props );
    this.queueingExecutor = Executors.newFixedThreadPool( 1, "Index updates queue processor for index " + indexName, maxQueueLength );
    this.workersExecutor = BackendFactory.buildWorkersExecutor( props, indexName );
  }
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

 
  LuceneBackendResources(WorkerBuildContext context, DirectoryBasedIndexManager indexManager, Properties props, AbstractWorkspaceImpl workspace) {
    this.indexName = indexManager.getIndexName();
    this.errorHandler = context.getErrorHandler();
    this.workspace = workspace;
    this.visitor = new LuceneWorkVisitor( workspace );
    this.maxQueueLength = CommonPropertiesParse.extractMaxQueueSize( indexName, props );
    this.queueingExecutor = Executors.newFixedThreadPool( 1, "Index updates queue processor for index " + indexName, maxQueueLength );
    this.workersExecutor = BackendFactory.buildWorkersExecutor( props, indexName );
  }
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  private final ErrorHandler errorHandler;
 
  PerDPResources(WorkerBuildContext context, DirectoryProvider<?> dp) {
    errorHandler = context.getErrorHandler();
    workspace = new Workspace( context, dp, errorHandler );
    visitor = new LuceneWorkVisitor( workspace, context );
    executor = Executors.newFixedThreadPool( 1, "Directory writer" );
    exclusiveIndexUsage = context.isExclusiveIndexUsageEnabled( dp );
  }
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  private static final Logger LOG = Logger.getLogger(GaeInstantBackendQueueProcessor.class.getName());

  public void initialize(Properties props, WorkerBuildContext context, DirectoryBasedIndexManager indexManager) {
    this.workspace = new GaeInstantWorkspace(indexManager, context, props);
    this.visitor = new LuceneWorkVisitor(workspace);
    this.errorHandler = context.getErrorHandler();

    DirectoryDAO directoryDAO = new DirectoryDAO();
    Directory directory = directoryDAO.findByName(indexManager.getIndexName());
    readLock = new LockImpl(directory, "backendLock.parallelModificationLock");
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

    if ( maxThreads < 1 ) {
      throw new IllegalArgumentException( "maxThreads needs to be at least 1" );
    }
    this.monitor = monitor;
    workspace = new Workspace( context, dp );
    visitor = new LuceneWorkVisitor( workspace, context );
    executor = Executors.newFixedThreadPool( maxThreads, "indexwriter" );
  }
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  private final boolean exclusiveIndexUsage;
  private final ErrorHandler errorHandler;
 
  PerDPResources(WorkerBuildContext context, DirectoryProvider<?> dp) {
    workspace = new Workspace( context, dp );
    visitor = new LuceneWorkVisitor( workspace, context );
    executor = Executors.newFixedThreadPool( 1, "Directory writer" );
    exclusiveIndexUsage = context.isExclusiveIndexUsageEnabled( dp );
    errorHandler = context.getErrorHandler();
  }
View Full Code Here

Examples of org.hibernate.search.backend.impl.lucene.works.LuceneWorkVisitor

  LuceneBackendResources(WorkerBuildContext context, DirectoryBasedIndexManager indexManager, Properties props, AbstractWorkspaceImpl workspace) {
    this.indexName = indexManager.getIndexName();
    this.errorHandler = context.getErrorHandler();
    this.workspace = workspace;
    this.visitor = new LuceneWorkVisitor( workspace );
    this.maxQueueLength = PropertiesParseHelper.extractMaxQueueSize( indexName, props );
    this.queueingExecutor = Executors.newFixedThreadPool( 1, "Index updates queue processor for index " + indexName, maxQueueLength );
    this.workersExecutor = BackendFactory.buildWorkersExecutor( props, indexName );
    ReentrantReadWriteLock readWriteLock = new ReentrantReadWriteLock();
    readLock = readWriteLock.readLock();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.