Search in sources :

Example 1 with ConfigProvider

use of com.netflix.exhibitor.core.config.ConfigProvider in project exhibitor by soabase.

the class ExhibitorCreator method makeConfigProvider.

private ConfigProvider makeConfigProvider(String configType, ExhibitorCLI cli, CommandLine commandLine, PropertyBasedS3Credential awsCredentials, PropertyBasedS3ClientConfig awsClientConfig, BackupProvider backupProvider, String useHostname, String s3Region) throws Exception {
    Properties defaultProperties = makeDefaultProperties(commandLine, backupProvider);
    ConfigProvider configProvider;
    if (configType.equals("s3")) {
        configProvider = getS3Provider(cli, commandLine, awsCredentials, awsClientConfig, useHostname, defaultProperties, s3Region);
    } else if (configType.equals("file")) {
        configProvider = getFileSystemProvider(commandLine, defaultProperties);
    } else if (configType.equals("zookeeper")) {
        configProvider = getZookeeperProvider(commandLine, useHostname, defaultProperties);
    } else if (configType.equals("none")) {
        log.warn("Warning: you have intentionally turned off shared configuration. This mode is meant for special purposes only. Please verify that this is your intent.");
        configProvider = getNoneProvider(commandLine, defaultProperties);
    } else {
        configProvider = null;
        log.error("Unknown configtype: " + configType);
    }
    return configProvider;
}
Also used : FileSystemConfigProvider(com.netflix.exhibitor.core.config.filesystem.FileSystemConfigProvider) ConfigProvider(com.netflix.exhibitor.core.config.ConfigProvider) NoneConfigProvider(com.netflix.exhibitor.core.config.none.NoneConfigProvider) ZookeeperConfigProvider(com.netflix.exhibitor.core.config.zookeeper.ZookeeperConfigProvider) S3ConfigProvider(com.netflix.exhibitor.core.config.s3.S3ConfigProvider) DefaultProperties(com.netflix.exhibitor.core.config.DefaultProperties) Properties(java.util.Properties)

Aggregations

ConfigProvider (com.netflix.exhibitor.core.config.ConfigProvider)1 DefaultProperties (com.netflix.exhibitor.core.config.DefaultProperties)1 FileSystemConfigProvider (com.netflix.exhibitor.core.config.filesystem.FileSystemConfigProvider)1 NoneConfigProvider (com.netflix.exhibitor.core.config.none.NoneConfigProvider)1 S3ConfigProvider (com.netflix.exhibitor.core.config.s3.S3ConfigProvider)1 ZookeeperConfigProvider (com.netflix.exhibitor.core.config.zookeeper.ZookeeperConfigProvider)1 Properties (java.util.Properties)1