private ClusterConfig buildNormalClusterConfig(DalConnectionStringConfigure configure) {
        ClusterConfigWithNoVersion clusterConfig =
                new ClusterConfigWithNoVersion(configure.getName(), ClusterType.NORMAL, DatabaseCategory.MYSQL);
        DatabaseShardConfigImpl databaseShardConfig = new DatabaseShardConfigImpl(clusterConfig, 0);
        DatabaseConfigImpl databaseConfig = new DatabaseConfigImpl(databaseShardConfig);
        HostAndPort hostAndPort = ConnectionStringParser.parseHostPortFromURL(configure.getConnectionUrl());
        databaseConfig.setIp(hostAndPort.getHost());
        databaseConfig.setPort(hostAndPort.getPort());
        databaseConfig.setDbName(provider.getDbName());
        databaseConfig.setUid(configure.getUserName());
        databaseConfig.setPwd(configure.getPassword());
        databaseShardConfig.addDatabaseConfig(databaseConfig);
        clusterConfig.addDatabaseShardConfig(databaseShardConfig);
        // todo-lhj  make configurable RouteStrategy of
        clusterConfig.setRouteStrategyConfig(new DefaultClusterRouteStrategyConfig(RouteStrategyEnum.READ_MASTER.name()));
        clusterConfig.setCustomizedOption(new DefaultDalConfigCustomizedOption());
        return clusterConfig;
    }
private ClusterConfig buildNormalClusterConfig(DalConnectionStringConfigure configure) {
        ClusterConfigWithNoVersion clusterConfig =
                new ClusterConfigWithNoVersion(configure.getName(), ClusterType.NORMAL, DatabaseCategory.MYSQL);
        DatabaseShardConfigImpl databaseShardConfig = new DatabaseShardConfigImpl(clusterConfig, 0);
        DatabaseConfigImpl databaseConfig = new DatabaseConfigImpl(databaseShardConfig);
        HostAndPort hostAndPort = ConnectionStringParser.parseHostPortFromURL(configure.getConnectionUrl());
        databaseConfig.setIp(hostAndPort.getHost());
        databaseConfig.setPort(hostAndPort.getPort());
        databaseConfig.setDbName(provider.getDbName());
        databaseConfig.setUid(configure.getUserName());
        databaseConfig.setPwd(configure.getPassword());
        databaseShardConfig.addDatabaseConfig(databaseConfig);
        clusterConfig.addDatabaseShardConfig(databaseShardConfig);
       
        clusterConfig.setRouteStrategyConfig(new DefaultClusterRouteStrategyConfig(RouteStrategyEnum.READ_MASTER.name()));
        clusterConfig.setCustomizedOption(new DefaultDalConfigCustomizedOption());
        return clusterConfig;
    }
private clusterconfig buildnormalclusterconfig(dalconnectionstringconfigure configure) { clusterconfigwithnoversion clusterconfig = new clusterconfigwithnoversion(configure.getname(), clustertype.normal, databasecategory.mysql); databaseshardconfigimpl databaseshardconfig = new databaseshardconfigimpl(clusterconfig, 0); databaseconfigimpl databaseconfig = new databaseconfigimpl(databaseshardconfig); hostandport hostandport = connectionstringparser.parsehostportfromurl(configure.getconnectionurl()); databaseconfig.setip(hostandport.gethost()); databaseconfig.setport(hostandport.getport()); databaseconfig.setdbname(provider.getdbname()); databaseconfig.setuid(configure.getusername()); databaseconfig.setpwd(configure.getpassword()); databaseshardconfig.adddatabaseconfig(databaseconfig); clusterconfig.adddatabaseshardconfig(databaseshardconfig); clusterconfig.setroutestrategyconfig(new defaultclusterroutestrategyconfig(routestrategyenum.read_master.name())); clusterconfig.setcustomizedoption(new defaultdalconfigcustomizedoption()); return clusterconfig; }