Examples of UserShardStrategyFactory


Examples of org.makersoft.shards.strategy.UserShardStrategyFactory

    SqlSessionFactory sqlMapper_1 = new SqlSessionFactoryBuilder().build(reader_1);
   
    shardConfigs.add(new ShardConfigurationImpl(0, sqlMapper_0.getConfiguration().getEnvironment().getDataSource(), sqlMapper_0));
    shardConfigs.add(new ShardConfigurationImpl(1, sqlMapper_1.getConfiguration().getEnvironment().getDataSource(), sqlMapper_1));
   
    factory = new ShardedSqlSessionFactoryBuilder().build(shardConfigs, new UserShardStrategyFactory());
   
    Assert.assertNotNull(factory);
  }
View Full Code Here

Examples of org.makersoft.shards.strategy.UserShardStrategyFactory

        .getEnvironment().getDataSource(), sqlMapper_1));
    shardConfigs.add(new ShardConfigurationImpl(2, sqlMapper_2.getConfiguration()
        .getEnvironment().getDataSource(), sqlMapper_2));

    factory = new ShardedSqlSessionFactoryBuilder().build(shardConfigs,
        new UserShardStrategyFactory());

    Assert.assertNotNull(factory);

    factory = new ShardedSqlSessionFactoryBuilder().build(shardConfigs,
        new ShardStrategyFactory() {
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.