use of com.netflix.exhibitor.core.config.RollingConfigState in project exhibitor by soabase.
the class MockConfigProvider method setConfig.
void setConfig(final IntConfigs type, final int value) {
final InstanceConfig config = collection.getRootConfig();
final InstanceConfig newConfig = new InstanceConfig() {
@Override
public String getString(StringConfigs configType) {
return config.getString(configType);
}
@Override
public int getInt(IntConfigs configType) {
if (configType == type) {
return value;
}
return config.getInt(configType);
}
};
collection = new ConfigCollection() {
@Override
public InstanceConfig getConfigForThisInstance(String hostname) {
return getRootConfig();
}
@Override
public InstanceConfig getRootConfig() {
return newConfig;
}
@Override
public InstanceConfig getRollingConfig() {
return null;
}
@Override
public boolean isRolling() {
return false;
}
@Override
public RollingConfigState getRollingConfigState() {
return null;
}
};
}
use of com.netflix.exhibitor.core.config.RollingConfigState in project exhibitor by soabase.
the class MockConfigProvider method setConfig.
void setConfig(final StringConfigs type, final String value) {
final InstanceConfig config = collection.getRootConfig();
final InstanceConfig newConfig = new InstanceConfig() {
@Override
public String getString(StringConfigs configType) {
if (configType == type) {
return value;
}
return config.getString(configType);
}
@Override
public int getInt(IntConfigs configType) {
return config.getInt(configType);
}
};
collection = new ConfigCollection() {
@Override
public InstanceConfig getConfigForThisInstance(String hostname) {
return getRootConfig();
}
@Override
public InstanceConfig getRootConfig() {
return newConfig;
}
@Override
public InstanceConfig getRollingConfig() {
return null;
}
@Override
public boolean isRolling() {
return false;
}
@Override
public RollingConfigState getRollingConfigState() {
return null;
}
};
}
Aggregations