Package org.hibernate.search.store

Examples of org.hibernate.search.store.RAMDirectoryProvider


    cfg.setProperty( "hibernate.search.Animal.sharding_strategy.nbr_of_shards", "2" );
    cfg.setProperty( "hibernate.search.Animal.0.indexName", "Animal00" );
  }

  public void testIdShardingStrategy() {
    DirectoryProvider[] dps = new DirectoryProvider[] { new RAMDirectoryProvider(), new RAMDirectoryProvider() };
    IdHashShardingStrategy shardingStrategy = new IdHashShardingStrategy();
    shardingStrategy.initialize( null, dps);
    assertTrue( dps[1] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 1, "1", null) );
    assertTrue( dps[0] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 2, "2", null) );
  }
View Full Code Here


  private IdHashShardingStrategy shardStrategy;

  protected void setUp() throws Exception {
    shardStrategy = new IdHashShardingStrategy();
    shardStrategy.initialize( null, new DirectoryProvider[] {
        new RAMDirectoryProvider(), new RAMDirectoryProvider() } );
  }
View Full Code Here

    cfg.setProperty( "hibernate.search.Animal.sharding_strategy.nbr_of_shards", "2" );
    cfg.setProperty( "hibernate.search.Animal.0.indexName", "Animal00" );
  }

  public void testIdShardingStrategy() {
    DirectoryProvider[] dps = new DirectoryProvider[] { new RAMDirectoryProvider(), new RAMDirectoryProvider() };
    IdHashShardingStrategy shardingStrategy = new IdHashShardingStrategy();
    shardingStrategy.initialize( null, dps);
    assertTrue( dps[1] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 1, "1", null) );
    assertTrue( dps[0] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 2, "2", null) );
  }
View Full Code Here

    cfg.setProperty( "hibernate.search.Animal.sharding_strategy.nbr_of_shards", "2" );
    cfg.setProperty( "hibernate.search.Animal.0.indexName", "Animal00" );
  }

  public void testIdShardingStrategy() {
    DirectoryProvider[] dps = new DirectoryProvider[] { new RAMDirectoryProvider(), new RAMDirectoryProvider() };
    IdHashShardingStrategy shardingStrategy = new IdHashShardingStrategy();
    shardingStrategy.initialize( null, dps);
    assertTrue( dps[1] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 1, "1", null) );
    assertTrue( dps[0] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 2, "2", null) );
  }
View Full Code Here

    cfg.setProperty( "hibernate.search.Animal.sharding_strategy.nbr_of_shards", "2" );
    cfg.setProperty( "hibernate.search.Animal.0.indexName", "Animal00" );
  }

  public void testIdShardingStrategy() {
    DirectoryProvider[] dps = new DirectoryProvider[] { new RAMDirectoryProvider(), new RAMDirectoryProvider() };
    IdHashShardingStrategy shardingStrategy = new IdHashShardingStrategy();
    shardingStrategy.initialize( null, dps);
    assertTrue( dps[1] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 1, "1", null) );
    assertTrue( dps[0] == shardingStrategy.getDirectoryProviderForAddition( Animal.class, 2, "2", null) );
  }
View Full Code Here

  private IdHashShardingStrategy shardStrategy;

  protected void setUp() throws Exception {
    shardStrategy = new IdHashShardingStrategy();
    shardStrategy.initialize( null, new DirectoryProvider[] {
        new RAMDirectoryProvider(), new RAMDirectoryProvider() } );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.store.RAMDirectoryProvider

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.