public SimpleRetryStrategy(@NonNull final SimpleRetryStrategyConfiguration conf) { this(conf.getNumRetries(), conf.getWaitTimeInMs()); }
public IRetryStrategy getRetryStrategy() { final String strategy = conf.getProperty(DEFAULT_STRATEGY, SIMPLE_RETRY_STRATEGY); switch (strategy) { case SIMPLE_RETRY_STRATEGY: return new SimpleRetryStrategy(new SimpleRetryStrategyConfiguration(conf)); default: throw new JobRuntimeException(String.format("Retry strategy %s is not supported.", strategy)); } } }