private void validateMetaHolder(MetaHolder metaHolder) { Validate.notNull(metaHolder, "metaHolder is required parameter and cannot be null"); Validate.isTrue(metaHolder.isCommandAnnotationPresent(), "hystrixCommand annotation is absent"); }
@SuppressWarnings("unchecked") public List<Class<? extends Throwable>> getCommandIgnoreExceptions() { if (!isCommandAnnotationPresent()) return Collections.emptyList(); return getOrDefault(new Supplier<List<Class<? extends Throwable>>>() { @Override public List<Class<? extends Throwable>> get() { return ImmutableList.<Class<? extends Throwable>>copyOf(hystrixCommand.ignoreExceptions()); } }, new Supplier<List<Class<? extends Throwable>>>() { @Override public List<Class<? extends Throwable>> get() { return hasDefaultProperties() ? ImmutableList.<Class<? extends Throwable>>copyOf(defaultProperties.ignoreExceptions()) : Collections.<Class<? extends Throwable>>emptyList(); } }, this.<Class<? extends Throwable>>nonEmptyList()); }
public String getCommandGroupKey() { return isCommandAnnotationPresent() ? get(hystrixCommand.groupKey(), defaultGroupKey) : ""; }
public List<HystrixProperty> getCommandProperties() { if (!isCommandAnnotationPresent()) return Collections.emptyList(); return getOrDefault(new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return ImmutableList.copyOf(hystrixCommand.commandProperties()); } }, new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return hasDefaultProperties() ? ImmutableList.copyOf(defaultProperties.commandProperties()) : Collections.<HystrixProperty>emptyList(); } }, this.<HystrixProperty>nonEmptyList()); }
public List<HystrixProperty> getThreadPoolProperties() { if (!isCommandAnnotationPresent()) return Collections.emptyList(); return getOrDefault(new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return ImmutableList.copyOf(hystrixCommand.threadPoolProperties()); } }, new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return hasDefaultProperties() ? ImmutableList.copyOf(defaultProperties.threadPoolProperties()) : Collections.<HystrixProperty>emptyList(); } }, this.<HystrixProperty>nonEmptyList()); }
public String getCommandKey() { return isCommandAnnotationPresent() ? get(hystrixCommand.commandKey(), defaultCommandKey) : ""; }
public String getThreadPoolKey() { return isCommandAnnotationPresent() ? get(hystrixCommand.threadPoolKey(), defaultThreadPoolKey) : ""; }
private void validateMetaHolder(MetaHolder metaHolder) { Validate.notNull(metaHolder, "metaHolder is required parameter and cannot be null"); Validate.isTrue(metaHolder.isCommandAnnotationPresent(), "hystrixCommand annotation is absent"); }
public List<HystrixProperty> getCommandProperties() { if (!isCommandAnnotationPresent()) return Collections.emptyList(); return getOrDefault(new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return ImmutableList.copyOf(hystrixCommand.commandProperties()); } }, new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return hasDefaultProperties() ? ImmutableList.copyOf(defaultProperties.commandProperties()) : Collections.<HystrixProperty>emptyList(); } }, this.<HystrixProperty>nonEmptyList()); }
public List<HystrixProperty> getThreadPoolProperties() { if (!isCommandAnnotationPresent()) return Collections.emptyList(); return getOrDefault(new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return ImmutableList.copyOf(hystrixCommand.threadPoolProperties()); } }, new Supplier<List<HystrixProperty>>() { @Override public List<HystrixProperty> get() { return hasDefaultProperties() ? ImmutableList.copyOf(defaultProperties.threadPoolProperties()) : Collections.<HystrixProperty>emptyList(); } }, this.<HystrixProperty>nonEmptyList()); }
public String getThreadPoolKey() { return isCommandAnnotationPresent() ? get(hystrixCommand.threadPoolKey(), defaultThreadPoolKey) : ""; }
@SuppressWarnings("unchecked") public List<Class<? extends Throwable>> getCommandIgnoreExceptions() { if (!isCommandAnnotationPresent()) return Collections.emptyList(); return getOrDefault(new Supplier<List<Class<? extends Throwable>>>() { @Override public List<Class<? extends Throwable>> get() { return ImmutableList.<Class<? extends Throwable>>copyOf(hystrixCommand.ignoreExceptions()); } }, new Supplier<List<Class<? extends Throwable>>>() { @Override public List<Class<? extends Throwable>> get() { return hasDefaultProperties() ? ImmutableList.<Class<? extends Throwable>>copyOf(defaultProperties.ignoreExceptions()) : Collections.<Class<? extends Throwable>>emptyList(); } }, this.<Class<? extends Throwable>>nonEmptyList()); }
public String getCommandGroupKey() { return isCommandAnnotationPresent() ? get(hystrixCommand.groupKey(), defaultGroupKey) : ""; }
public String getCommandKey() { return isCommandAnnotationPresent() ? get(hystrixCommand.commandKey(), defaultCommandKey) : ""; }