private static HystrixProperty<ExecutionIsolationStrategy> getProperty(final String propertyPrefix, final HystrixCommandKey key, final String instanceProperty, final ExecutionIsolationStrategy builderOverrideValue, final ExecutionIsolationStrategy defaultValue) { return new ExecutionIsolationStrategyHystrixProperty(builderOverrideValue, key, propertyPrefix, defaultValue, instanceProperty); }
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, 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 static HystrixProperty<ExecutionIsolationStrategy> getProperty(final String propertyPrefix, final HystrixCommandKey key, final String instanceProperty, final ExecutionIsolationStrategy builderOverrideValue, final ExecutionIsolationStrategy defaultValue) { return new ExecutionIsolationStrategyHystrixProperty(builderOverrideValue, key, propertyPrefix, defaultValue, instanceProperty); }