@Test public void shouldIncrementRetries() { request.triedOnHost(HOST_1); assertNumberOfTotalAttempts(1); assertNumberOfAttemptsOnHost(1, HOST_1); request.triedOnHost(HOST_1); assertNumberOfTotalAttempts(2); assertNumberOfAttemptsOnHost(2, HOST_1); }
public void triedOnHost(InetSocketAddress host) { triedHosts.merge(host, 1, (old, ignore) -> old + 1); }
RetryableCassandraRequest { public void triedOnHost(InetSocketAddress host) { triedHosts.merge(host, 1, (old, ignore) -> old + 1); } }
RetryableCassandraRequest { public void triedOnHost(InetSocketAddress host) { triedHosts.merge(host, 1, (old, ignore) -> old + 1); } RetryableCassandraRequest(InetSocketAddress preferredHost,
            FunctionCheckedException<CassandraClient, V, K> fn); }
RetryableCassandraRequest { public void triedOnHost(InetSocketAddress host) { triedHosts.merge(host, 1, (old, ignore) -> old + 1); } RetryableCassandraRequest(InetSocketAddress preferredHost,
            FunctionCheckedException<CassandraClient, V, K> fn); InetSocketAddress getPreferredHost(); FunctionCheckedException<CassandraClient, V, K> getFunction(); int getNumberOfAttempts(); int getNumberOfAttemptsOnHost(InetSocketAddress host); boolean shouldGiveUpOnPreferredHost(); void giveUpOnPreferredHost(); boolean alreadyTriedOnHost(InetSocketAddress address); void triedOnHost(InetSocketAddress host); void registerException(Exception exception); AtlasDbDependencyException throwLimitReached(); }
RetryableCassandraRequest { public void triedOnHost(InetSocketAddress host) { triedHosts.merge(host, 1, (old, ignore) -> old + 1); } RetryableCassandraRequest(InetSocketAddress preferredHost,
            FunctionCheckedException<CassandraClient, V, K> fn); InetSocketAddress getPreferredHost(); FunctionCheckedException<CassandraClient, V, K> getFunction(); int getNumberOfAttempts(); int getNumberOfAttemptsOnHost(InetSocketAddress host); boolean shouldGiveUpOnPreferredHost(); void giveUpOnPreferredHost(); boolean alreadyTriedOnHost(InetSocketAddress address); void triedOnHost(InetSocketAddress host); void registerException(Exception exception); AtlasDbDependencyException throwLimitReached();  }