@Override public List<HostConnectionPool<T>> getPools() { return _delegate.getPools(); }
@Override public List<HostConnectionPool<T>> getPools() { return _delegate.getPools(); }
public Keyspace toHost(String hostName) throws ConnectionException { Host host = _keyspace.getConnectionPool().getPools().stream() .map(HostConnectionPool::getHost) .filter(poolHost -> hostName.equals(poolHost.getHostName())) .findFirst().orElseThrow(() -> new NoAvailableHostsException("No hosts pools found")); return pinToVerifiedHost(host); }
public Keyspace toHost(String hostName) throws ConnectionException { Host host = _keyspace.getConnectionPool().getPools().stream() .map(HostConnectionPool::getHost) .filter(poolHost -> hostName.equals(poolHost.getHostName())) .findFirst().orElseThrow(() -> new NoAvailableHostsException("No hosts pools found")); return pinToVerifiedHost(host); }
/** * Returns a view of the provided Keyspace that pins all operations to the provided host. */ public Keyspace toHost(Host host) throws ConnectionException { if (!_keyspace.getConnectionPool().getPools().stream() .map(HostConnectionPool::getHost) .anyMatch(poolHost -> poolHost.equals(host))) { throw new NoAvailableHostsException("Host not found in pool"); } return pinToVerifiedHost(host); }
/** * Returns a view of the provided Keyspace that pins all operations to the provided host. */ public Keyspace toHost(Host host) throws ConnectionException { if (!_keyspace.getConnectionPool().getPools().stream() .map(HostConnectionPool::getHost) .anyMatch(poolHost -> poolHost.equals(host))) { throw new NoAvailableHostsException("Host not found in pool"); } return pinToVerifiedHost(host); }