use of com.twitter.distributedlog.service.config.NullStreamConfigProvider in project distributedlog by twitter.
the class DistributedLogServer method getStreamConfigProvider.
private StreamConfigProvider getStreamConfigProvider(DistributedLogConfiguration dlConf, StreamPartitionConverter partitionConverter) throws ConfigurationException {
StreamConfigProvider streamConfProvider = new NullStreamConfigProvider();
if (streamConf.isPresent() && conf.isPresent()) {
String dynConfigPath = streamConf.get();
String defaultConfigFile = conf.get();
streamConfProvider = new ServiceStreamConfigProvider(dynConfigPath, defaultConfigFile, partitionConverter, configExecutorService, dlConf.getDynamicConfigReloadIntervalSec(), TimeUnit.SECONDS);
} else if (conf.isPresent()) {
String configFile = conf.get();
streamConfProvider = new DefaultStreamConfigProvider(configFile, configExecutorService, dlConf.getDynamicConfigReloadIntervalSec(), TimeUnit.SECONDS);
}
return streamConfProvider;
}
Aggregations