Package org.hibernate.search.backend.impl.lucene

Examples of org.hibernate.search.backend.impl.lucene.ScheduledCommitPolicy


    AbstractWorkspaceImpl workspace = sfAsyncExclusiveIndex.extractWorkspace( Quote.class );
    CommitPolicy commitPolicy = workspace.getCommitPolicy();

    assertTrue( commitPolicy instanceof ScheduledCommitPolicy );

    ScheduledCommitPolicy scheduledCommitPolicy = (ScheduledCommitPolicy) commitPolicy;
    ScheduledThreadPoolExecutor scheduledExecutor = (ScheduledThreadPoolExecutor) scheduledCommitPolicy.getScheduledExecutorService();

    assertConditionMet( new TaskExecutedCondition( scheduledExecutor, 1 ) );
  }
View Full Code Here


    CommitPolicy commitPolicy = getCommitPolicy( sfHolder );
    assertTrue( commitPolicyClass.isAssignableFrom( commitPolicy.getClass() ) );
  }

  private int extractInterval(SearchFactoryHolder sfHolder) {
    ScheduledCommitPolicy commitPolicy = (ScheduledCommitPolicy) getCommitPolicy( sfHolder );
    return commitPolicy.getDelay();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.backend.impl.lucene.ScheduledCommitPolicy

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.