@Test public void testSimple() throws Exception { ArrayList<Integer> values = new ArrayList<Integer>(); int delay = 0; while (delay < maxDelay) { delay = delayManager.getReconnectDelayMs(address); values.add(delay); } List<Integer> expected = Arrays.asList(100, 200, 400, 800, 1600, 3200, 6400, 10000); assertEquals(expected, values); assertEquals(maxDelay, delayManager.getReconnectDelayMs(address)); }
public int getReconnectDelayMs(InetSocketAddress socketAddress) { return getReconnectDelayMs(socketAddress.getAddress()); }
ReconnectDelayManager { public int getReconnectDelayMs(InetSocketAddress socketAddress) { return getReconnectDelayMs(socketAddress.getAddress()); } }
ReconnectDelayManager { public int getReconnectDelayMs(InetSocketAddress socketAddress) { return getReconnectDelayMs(socketAddress.getAddress()); } ReconnectDelayManager();  ReconnectDelayManager(final int initialReconnectDelayMs,
                                 final int maxReconnectDelayMs,
                                 final int reconnectDelayResetMs,
                                 final TimeProvider timeProvider); }
ReconnectDelayManager { public int getReconnectDelayMs(InetSocketAddress socketAddress) { return getReconnectDelayMs(socketAddress.getAddress()); } ReconnectDelayManager();  ReconnectDelayManager(final int initialReconnectDelayMs,
                                 final int maxReconnectDelayMs,
                                 final int reconnectDelayResetMs,
                                 final TimeProvider timeProvider); int getReconnectDelayMs(InetSocketAddress socketAddress); int getReconnectDelayMs(InetAddress address); }
ReconnectDelayManager { public int getReconnectDelayMs(InetSocketAddress socketAddress) { return getReconnectDelayMs(socketAddress.getAddress()); } ReconnectDelayManager();  ReconnectDelayManager(final int initialReconnectDelayMs,
                                 final int maxReconnectDelayMs,
                                 final int reconnectDelayResetMs,
                                 final TimeProvider timeProvider); int getReconnectDelayMs(InetSocketAddress socketAddress); int getReconnectDelayMs(InetAddress address); static final int DEFAULT_RECONNECT_DELAY_INITIAL_MS; static final int DEFAULT_RECONNECT_MAX_DELAY_MS; static final int DEFAULT_RECONNECT_DELAY_RESET_TIME_MS; static TimeProvider DEFAULT_TIMEPROVIDER; }