use of com.ctrip.framework.dal.cluster.client.base.PropertyAccessor in project dal by ctripcorp.
the class ShardStrategyElement method getTableProperty.
protected String getTableProperty(String tableName, String propertyName, String defaultValue) {
PropertyAccessor properties = getTableProperties(tableName);
String property = properties.getProperty(propertyName);
return property != null ? property : defaultValue;
}
use of com.ctrip.framework.dal.cluster.client.base.PropertyAccessor in project dal by ctripcorp.
the class ShardStrategyElement method start.
@Override
public void start() {
for (TablesElement tablesElement : tablesElements) {
tablesElement.merge(this);
tablesElement.start();
for (String tableName : tablesElement.getTableNames()) {
PropertyAccessor properties = tablesElement.getTableProperties(tableName);
if (tableProperties.put(tableName, properties) != null)
throw new ClusterRuntimeException("duplicate table names defined under ShardStrategyElement");
}
}
}
Aggregations