@Test public void testPollingIntervalStartsAtMinimum() { BackoffImpl b = new BackoffImpl(MIN_INTERVAL, MAX_INTERVAL, BASE); assertEquals(MIN_INTERVAL, b.getPollingInterval()); }
@Override public int getPollingInterval() { double multiplier = Math.pow(base, backoff.get()); int interval = (int) (minInterval * multiplier); return Math.min(interval, maxInterval); }
BackoffImpl implements Backoff { @Override public int getPollingInterval() { double multiplier = Math.pow(base, backoff.get()); int interval = (int) (minInterval * multiplier); return Math.min(interval, maxInterval); } }
BackoffImpl implements Backoff { @Override public int getPollingInterval() { double multiplier = Math.pow(base, backoff.get()); int interval = (int) (minInterval * multiplier); return Math.min(interval, maxInterval); } BackoffImpl(int minInterval, int maxInterval, double base); }
BackoffImpl implements Backoff { @Override public int getPollingInterval() { double multiplier = Math.pow(base, backoff.get()); int interval = (int) (minInterval * multiplier); return Math.min(interval, maxInterval); } BackoffImpl(int minInterval, int maxInterval, double base); @Override int getPollingInterval(); @Override void increment(); @Override void reset(); }
BackoffImpl implements Backoff { @Override public int getPollingInterval() { double multiplier = Math.pow(base, backoff.get()); int interval = (int) (minInterval * multiplier); return Math.min(interval, maxInterval); } BackoffImpl(int minInterval, int maxInterval, double base); @Override int getPollingInterval(); @Override void increment(); @Override void reset();  }