@Test(expected=IllegalArgumentException.class) public void invalidMaxRetries() throws Exception { Retry retry = new Retry(); ObjectNode conf = JsonNodeFactory.instance.objectNode(); conf.put("maxRetries", -15); retry.configure(conf); }
@Override public void configure(JsonNode config) { ObjectNode defaultConfig = defaultConfig(); setAllMissingFields((ObjectNode) config, defaultConfig); checkConfig((ObjectNode)config); this.config = (ObjectNode) config; maxRetries = config.get(MAX_RETRIES).intValue(); initialDelay = config.get(INITIAL_DELAY).intValue(); maxDelay = config.get(MAX_DELAY).intValue(); backoffFactor = config.get(BACKOFF_FACTOR).doubleValue(); }
Retry extends AbstractErrorHandlerLayer<JsonNode> { @Override public void configure(JsonNode config) { ObjectNode defaultConfig = defaultConfig(); setAllMissingFields((ObjectNode) config, defaultConfig); checkConfig((ObjectNode)config); this.config = (ObjectNode) config; maxRetries = config.get(MAX_RETRIES).intValue(); initialDelay = config.get(INITIAL_DELAY).intValue(); maxDelay = config.get(MAX_DELAY).intValue(); backoffFactor = config.get(BACKOFF_FACTOR).doubleValue(); } }
Retry extends AbstractErrorHandlerLayer<JsonNode> { @Override public void configure(JsonNode config) { ObjectNode defaultConfig = defaultConfig(); setAllMissingFields((ObjectNode) config, defaultConfig); checkConfig((ObjectNode)config); this.config = (ObjectNode) config; maxRetries = config.get(MAX_RETRIES).intValue(); initialDelay = config.get(INITIAL_DELAY).intValue(); maxDelay = config.get(MAX_DELAY).intValue(); backoffFactor = config.get(BACKOFF_FACTOR).doubleValue(); } Retry();  Retry(int maxRetries, int initialDelay, int maxDelay,
			double backoffFactor); }
Retry extends AbstractErrorHandlerLayer<JsonNode> { @Override public void configure(JsonNode config) { ObjectNode defaultConfig = defaultConfig(); setAllMissingFields((ObjectNode) config, defaultConfig); checkConfig((ObjectNode)config); this.config = (ObjectNode) config; maxRetries = config.get(MAX_RETRIES).intValue(); initialDelay = config.get(INITIAL_DELAY).intValue(); maxDelay = config.get(MAX_DELAY).intValue(); backoffFactor = config.get(BACKOFF_FACTOR).doubleValue(); } Retry();  Retry(int maxRetries, int initialDelay, int maxDelay,
			double backoffFactor); @Override void configure(JsonNode config); static ObjectNode defaultConfig(); @Override JsonNode getConfiguration(); }
Retry extends AbstractErrorHandlerLayer<JsonNode> { @Override public void configure(JsonNode config) { ObjectNode defaultConfig = defaultConfig(); setAllMissingFields((ObjectNode) config, defaultConfig); checkConfig((ObjectNode)config); this.config = (ObjectNode) config; maxRetries = config.get(MAX_RETRIES).intValue(); initialDelay = config.get(INITIAL_DELAY).intValue(); maxDelay = config.get(MAX_DELAY).intValue(); backoffFactor = config.get(BACKOFF_FACTOR).doubleValue(); } Retry();  Retry(int maxRetries, int initialDelay, int maxDelay,
			double backoffFactor); @Override void configure(JsonNode config); static ObjectNode defaultConfig(); @Override JsonNode getConfiguration(); static final String URI; }