public ChainProperty(HystrixDynamicProperty<T> sProperty, ChainProperty<T> next) { super(next); // setup next pointer sProp = sProperty; sProp.addCallback(new Runnable() { @Override public void run() { logger.debug("Property changed: '{} = {}'", getName(), getValue()); checkAndFlip(); } }); checkAndFlip(); }
private ExecutionIsolationStrategyHystrixProperty(ExecutionIsolationStrategy builderOverrideValue, HystrixCommandKey key, String propertyPrefix, ExecutionIsolationStrategy defaultValue, String instanceProperty) { this.defaultValue = defaultValue; String overrideValue = null; if (builderOverrideValue != null) { overrideValue = builderOverrideValue.name(); } property = forString() .add(propertyPrefix + ".command." + key.name() + "." + instanceProperty, overrideValue) .add(propertyPrefix + ".command.default." + instanceProperty, defaultValue.name()) .build(); // initialize the enum value from the property parseProperty(); // use a callback to handle changes so we only handle the parse cost on updates rather than every fetch property.addCallback(new Runnable() { @Override public void run() { // when the property value changes we'll update the value parseProperty(); } }); }
private ExecutionIsolationStrategyHystrixProperty(ExecutionIsolationStrategy builderOverrideValue, HystrixCommandKey key, String propertyPrefix, String command, ExecutionIsolationStrategy defaultValue, String instanceProperty) { this.defaultValue = defaultValue; String overrideValue = null; if (builderOverrideValue != null) { overrideValue = builderOverrideValue.name(); } property = forString() .add(propertyPrefix + "." + command + "." + key.name() + "." + instanceProperty, null) .add(propertyPrefix + "." + command + "." + serviceKey(key.name()) + "." + instanceProperty, overrideValue) .add(propertyPrefix + "." + command + "." + typeKey(key.name()) + "." + instanceProperty, defaultValue.name()) .build(); // initialize the enum value from the property parseProperty(); // use a callback to handle changes so we only handle the parse cost // on updates rather than every fetch // when the property value changes we'll update the value property.addCallback(this::parseProperty); }
public ChainProperty(HystrixDynamicProperty<T> sProperty, ChainProperty<T> next) { super(next); // setup next pointer sProp = sProperty; sProp.addCallback(new Runnable() { @Override public void run() { logger.debug("Property changed: '{} = {}'", getName(), getValue()); checkAndFlip(); } }); checkAndFlip(); }
private ExecutionIsolationStrategyHystrixProperty(ExecutionIsolationStrategy builderOverrideValue, HystrixCommandKey key, String propertyPrefix, ExecutionIsolationStrategy defaultValue, String instanceProperty) { this.defaultValue = defaultValue; String overrideValue = null; if (builderOverrideValue != null) { overrideValue = builderOverrideValue.name(); } property = forString() .add(propertyPrefix + ".command." + key.name() + "." + instanceProperty, overrideValue) .add(propertyPrefix + ".command.default." + instanceProperty, defaultValue.name()) .build(); // initialize the enum value from the property parseProperty(); // use a callback to handle changes so we only handle the parse cost on updates rather than every fetch property.addCallback(new Runnable() { @Override public void run() { // when the property value changes we'll update the value parseProperty(); } }); }
private ExecutionIsolationStrategyHystrixProperty(ExecutionIsolationStrategy builderOverrideValue, HystrixCommandKey key, String propertyPrefix, String command, ExecutionIsolationStrategy defaultValue, String instanceProperty) { this.defaultValue = defaultValue; String overrideValue = null; if (builderOverrideValue != null) { overrideValue = builderOverrideValue.name(); } property = forString() .add(propertyPrefix + "." + command + "." + key.name() + "." + instanceProperty, null) .add(propertyPrefix + "." + command + "." + serviceKey(key.name()) + "." + instanceProperty, overrideValue) .add(propertyPrefix + "." + command + "." + typeKey(key.name()) + "." + instanceProperty, defaultValue.name()) .build(); // initialize the enum value from the property parseProperty(); // use a callback to handle changes so we only handle the parse cost // on updates rather than every fetch // when the property value changes we'll update the value property.addCallback(this::parseProperty); }
private ExecutionIsolationStrategyHystrixProperty(ExecutionIsolationStrategy builderOverrideValue, HystrixCommandKey key, String propertyPrefix, String command, ExecutionIsolationStrategy defaultValue, String instanceProperty) { this.defaultValue = defaultValue; String overrideValue = null; if (builderOverrideValue != null) { overrideValue = builderOverrideValue.name(); } property = forString() .add(propertyPrefix + "." + command + "." + key.name() + "." + instanceProperty, null) .add(propertyPrefix + "." + command + "." + serviceKey(key.name()) + "." + instanceProperty, overrideValue) .add(propertyPrefix + "." + command + "." + typeKey(key.name()) + "." + instanceProperty, defaultValue.name()) .build(); // initialize the enum value from the property parseProperty(); // use a callback to handle changes so we only handle the parse cost // on updates rather than every fetch // when the property value changes we'll update the value property.addCallback(this::parseProperty); }