Package org.hibernate.search.store.impl

Examples of org.hibernate.search.store.impl.IdHashShardingStrategy.initialize()


  @Test
  public void testIdShardingStrategy() {
    IndexManager[] dps = new IndexManager[] { RamIndexManager.makeRamDirectory(), RamIndexManager.makeRamDirectory() };
    IdHashShardingStrategy shardingStrategy = new IdHashShardingStrategy();
    shardingStrategy.initialize( null, dps );
    assertTrue( dps[1] == shardingStrategy.getIndexManagerForAddition( Animal.class, 1, "1", null ) );
    assertTrue( dps[0] == shardingStrategy.getIndexManagerForAddition( Animal.class, 2, "2", null ) );
    dps[0].destroy();
    dps[1].destroy();
  }
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.