@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { if (counter.incrementAndGet() > new Random().nextInt(1000)) { counter.set(0); throw new TransportException("TransportException"); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { if (counter.incrementAndGet() > new Random().nextInt(1000)) { counter.set(0); throw new TransportException("TransportException"); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { if ((counter.incrementAndGet() / 20) % 2 == 0) { think(100); } else { think(1); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { if ((counter.incrementAndGet() / 20) % 2 == 0) { think(100); } else { think(1); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), think(5)); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), think(500)); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { think(100); if (counter.incrementAndGet() > 10) { counter.set(0); throw new TransportException("TransportException"); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { think(100); if (counter.incrementAndGet() > 10) { counter.set(0); throw new TransportException("TransportException"); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { if (counter.incrementAndGet() > 100) { counter.set(0); throw new TransportException("TransportException"); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), think(500)); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), think(5)); }
@Override public <R> OperationResult<R> execute( HostConnectionPool<TestClient> pool, Operation<TestClient, R> op) throws ConnectionException { if (counter.incrementAndGet() > 100) { counter.set(0); throw new TransportException("TransportException"); } return new OperationResultImpl<R>(pool.getHost(), op.execute(null, null), 0); }