Package org.hibernate.search.backend.impl

Examples of org.hibernate.search.backend.impl.CommitPolicy


  @Test
  public void testScheduledCommits() throws Exception {
    writeData( sfAsyncExclusiveIndex, NUMBER_ENTITIES );
    AbstractWorkspaceImpl workspace = sfAsyncExclusiveIndex.extractWorkspace( Quote.class );
    CommitPolicy commitPolicy = workspace.getCommitPolicy();

    assertTrue( commitPolicy instanceof ScheduledCommitPolicy );

    ScheduledCommitPolicy scheduledCommitPolicy = (ScheduledCommitPolicy) commitPolicy;
    ScheduledThreadPoolExecutor scheduledExecutor = (ScheduledThreadPoolExecutor) scheduledCommitPolicy.getScheduledExecutorService();
View Full Code Here


    assertEquals( 100, extractInterval( sfAsyncExclusiveIndexCustomPeriod ) );
    assertEquals( DEFAULT_DELAY_MS, extractInterval( sfAsyncExclusiveIndex ) );
  }

  private void assertCommitPolicyUsed(SearchFactoryHolder sfHolder, Class<? extends CommitPolicy> commitPolicyClass) {
    CommitPolicy commitPolicy = getCommitPolicy( sfHolder );
    assertTrue( commitPolicyClass.isAssignableFrom( commitPolicy.getClass() ) );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.backend.impl.CommitPolicy

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.