use of com.twitter.distributedlog.config.DynamicConfigurationFactory in project distributedlog by twitter.
the class DistributedLogServer method getServiceDynConf.
private DynamicDistributedLogConfiguration getServiceDynConf(DistributedLogConfiguration dlConf) throws ConfigurationException {
Optional<DynamicDistributedLogConfiguration> dynConf = Optional.absent();
if (conf.isPresent()) {
DynamicConfigurationFactory configFactory = new DynamicConfigurationFactory(configExecutorService, dlConf.getDynamicConfigReloadIntervalSec(), TimeUnit.SECONDS);
dynConf = configFactory.getDynamicConfiguration(conf.get());
}
if (dynConf.isPresent()) {
return dynConf.get();
} else {
return ConfUtils.getConstDynConf(dlConf);
}
}
Aggregations