use of io.shardingjdbc.core.yaml.sharding.strategy.YamlStandardShardingStrategyConfiguration in project sharding-jdbc by shardingjdbc.
the class YamlShardingStrategyConfigurationTest method createStandardShardingStrategyConfig.
private YamlShardingStrategyConfiguration createStandardShardingStrategyConfig() {
YamlStandardShardingStrategyConfiguration standardShardingStrategyConfig = new YamlStandardShardingStrategyConfiguration();
standardShardingStrategyConfig.setShardingColumn("order_id");
standardShardingStrategyConfig.setPreciseAlgorithmClassName(PreciseOrderShardingAlgorithm.class.getName());
standardShardingStrategyConfig.setRangeAlgorithmClassName(RangeOrderShardingAlgorithm.class.getName());
YamlShardingStrategyConfiguration result = new YamlShardingStrategyConfiguration();
result.setStandard(standardShardingStrategyConfig);
return result;
}
Aggregations