Examples of prepareWorkPlan()


Examples of org.hibernate.search.backend.impl.WorkQueue.prepareWorkPlan()

    WorkQueue plannerEngine = new WorkQueue( searchFactory );

    plannerEngine.add( new Work( person, 1, WorkType.ADD ) );

    plannerEngine.prepareWorkPlan();
    List<LuceneWork> sealedQueue = plannerEngine.getSealedQueue();

    assertEquals( "There should only be one job in the queue", 1, sealedQueue.size() );
    assertTrue( "Wrong job type", sealedQueue.get( 0 ) instanceof AddLuceneWork );
View Full Code Here

Examples of org.hibernate.search.backend.impl.WorkQueue.prepareWorkPlan()

    assertEquals( "There should only be one job in the queue", 1, sealedQueue.size() );
    assertTrue( "Wrong job type", sealedQueue.get( 0 ) instanceof AddLuceneWork );

    plannerEngine.add( new Work( person, 1, WorkType.DELETE ) );
    plannerEngine.prepareWorkPlan();
    sealedQueue = plannerEngine.getSealedQueue();

    assertEquals( "Jobs should have countered each other", 0, sealedQueue.size() );

    fullTextSession.close();
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.