Package org.hibernate.search.backend

Examples of org.hibernate.search.backend.WorkQueue


  public void add(Work work, WorkQueue workQueue) {
    //don't check for builder it's done in prepareWork
    //FIXME WorkType.COLLECTION does not play well with batchSize
    workQueue.add( work );
    if ( batchSize > 0 && workQueue.size() >= batchSize ) {
      WorkQueue subQueue = workQueue.splitQueue();
      prepareWorks( subQueue );
      performWorks( subQueue );
    }
  }
View Full Code Here


  public void add(Work work, WorkQueue workQueue) {
    //don't check for builder it's done in prepareWork
    //FIXME WorkType.COLLECTION does not play well with batchSize
    workQueue.add( work );
    if ( batchSize > 0 && workQueue.size() >= batchSize ) {
      WorkQueue subQueue = workQueue.splitQueue();
      prepareWorks( subQueue );
      performWorks( subQueue );
    }
  }
View Full Code Here

  public void add(Work work, WorkQueue workQueue) {
    //don't check for builder it's done in prepareWork
    //FIXME WorkType.COLLECTION does not play well with batchSize
    workQueue.add( work );
    if ( batchSize > 0 && workQueue.size() >= batchSize ) {
      WorkQueue subQueue = workQueue.splitQueue();
      prepareWorks( subQueue );
      performWorks( subQueue );
    }
  }
View Full Code Here

      }
    }
  }

  public void flushWorks() {
    WorkQueue subQueue = queue.splitQueue();
    queueingProcessor.prepareWorks( subQueue );
    queueingProcessor.performWorks( subQueue );
  }
View Full Code Here

  public void add(Work work, WorkQueue workQueue) {
    //don't check for builder it's done in prepareWork
    //FIXME WorkType.COLLECTION does not play well with batchSize
    workQueue.add( work );
    if ( batchSize > 0 && workQueue.size() >= batchSize ) {
      WorkQueue subQueue = workQueue.splitQueue();
      prepareWorks( subQueue );
      performWorks( subQueue );
    }
  }
View Full Code Here

      // for correct configurations.
      log.warn(
          "It appears changes are being pushed to the index out of a transaction. " +
              "Register the IndexWorkFlushEventListener listener on flush to correctly manage Collections!"
      );
      WorkQueue queue = new WorkQueue( 2 ); //one work can be split
      queueingProcessor.add( work, queue );
      queueingProcessor.prepareWorks( queue );
      queueingProcessor.performWorks( queue );
    }
  }
View Full Code Here

        synchronizationPerTransaction.put(transaction, txSync);
      }
      txSync.add( work );
    }
    else {
      WorkQueue queue = new WorkQueue(2); //one work can be split
      queueingProcessor.add( work, queue );
      queueingProcessor.prepareWorks( queue );
      queueingProcessor.performWorks( queue );
    }
  }
View Full Code Here

  public void add(Work work, WorkQueue workQueue) {
    //don't check for builder it's done in prepareWork
    //FIXME WorkType.COLLECTION does not play well with batchSize
    workQueue.add( work );
    if ( batchSize > 0 && workQueue.size() >= batchSize ) {
      WorkQueue subQueue = workQueue.splitQueue();
      prepareWorks( subQueue );
      performWorks( subQueue );
    }
  }
View Full Code Here

  public void add(Work work, WorkQueue workQueue) {
    //don't check for builder it's done in prepareWork
    //FIXME WorkType.COLLECTION does not play well with batchSize
    workQueue.add( work );
    if ( batchSize > 0 && workQueue.size() >= batchSize ) {
      WorkQueue subQueue = workQueue.splitQueue();
      prepareWorks( subQueue );
      performWorks( subQueue );
    }
  }
View Full Code Here

    else {
      // this is a workaround: isTransactionInProgress should return "true"
      // for correct configurations.
      log.warn( "It appears changes are being pushed to the index out of a transaction. " +
          "Register the IndexWorkFlushEventListener listener on flush to correctly manage Collections!" );
      WorkQueue queue = new WorkQueue( 2 ); //one work can be split
      queueingProcessor.add( work, queue );
      queueingProcessor.prepareWorks( queue );
      queueingProcessor.performWorks( queue );
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.backend.WorkQueue

Copyright © 2018 www.massapicom. 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.