private static HystrixCommandProperties initCommandProperties(HystrixCommandKey commandKey, HystrixPropertiesStrategy propertiesStrategy, HystrixCommandProperties.Setter commandPropertiesDefaults) { if (propertiesStrategy == null) { return HystrixPropertiesFactory.getCommandProperties(commandKey, commandPropertiesDefaults); } else { // used for unit testing return propertiesStrategy.getCommandProperties(commandKey, commandPropertiesDefaults); } }
properties = hystrixPropertiesStrategy.getCommandProperties(key, builder); return hystrixPropertiesStrategy.getCommandProperties(key, builder);
properties = hystrixPropertiesStrategy.getCommandProperties(key, builder); return hystrixPropertiesStrategy.getCommandProperties(key, builder);
private static HystrixCommandProperties initCommandProperties(HystrixCommandKey commandKey, HystrixPropertiesStrategy propertiesStrategy, HystrixCommandProperties.Setter commandPropertiesDefaults) { if (propertiesStrategy == null) { return HystrixPropertiesFactory.getCommandProperties(commandKey, commandPropertiesDefaults); } else { // used for unit testing return propertiesStrategy.getCommandProperties(commandKey, commandPropertiesDefaults); } }
@Override public HystrixCommandProperties getCommandProperties(HystrixCommandKey qualifiedCommandKey, com.netflix.hystrix.HystrixCommandProperties.Setter builder) { if (MultiConfigId.hasMultiSourceId(qualifiedCommandKey)) { return strategies.get(MultiConfigId.readFrom(qualifiedCommandKey)) .getCommandProperties(MultiConfigId.decode(qualifiedCommandKey), builder); } else { return underlying().map(strategy -> strategy.getCommandProperties(qualifiedCommandKey, builder)) .orElseGet(() -> super.getCommandProperties(qualifiedCommandKey, builder)); } }
@Override public HystrixCommandProperties getCommandProperties(HystrixCommandKey commandKey, com.netflix.hystrix.HystrixCommandProperties.Setter builder) { return this.beanMapping.getBeanKey(commandKey) .flatMap(beanKey -> createCommandProperties(beanKey, commandKey, builder)) .orElse(super.getCommandProperties(commandKey, builder)); }
@Override public HystrixCommandProperties getCommandProperties(HystrixCommandKey commandKey, com.netflix.hystrix.HystrixCommandProperties.Setter builder) { return this.strategyMapping.getHystrixStrategies(commandKey) .getHystrixPropertiesStrategy() .getCommandProperties(commandKey, builder); }