@Test public void backoff_doubles() { AtomicBackoff backoff = new AtomicBackoff("test", 3); backoff.getState().backoff(); assertEquals(6, backoff.getState().get()); backoff.getState().backoff(); assertEquals(12, backoff.getState().get()); backoff.getState().backoff(); assertEquals(24, backoff.getState().get()); backoff = new AtomicBackoff("test", 13); backoff.getState().backoff(); assertEquals(26, backoff.getState().get()); }
public State getState() { return new State(value.get()); }
AtomicBackoff { public State getState() { return new State(value.get()); } }
AtomicBackoff { public State getState() { return new State(value.get()); } AtomicBackoff(String name, long value); }
AtomicBackoff { public State getState() { return new State(value.get()); } AtomicBackoff(String name, long value); State getState(); }
AtomicBackoff { public State getState() { return new State(value.get()); } AtomicBackoff(String name, long value); State getState();  }