@Override public String apply(Host input) { if (input != null) { return input.getHostName(); } return null; } });
@Override public String apply(Host input) { if (input != null) { return input.getHostName(); } return null; } });
@Override public void onHostRemoved(Host host) { LOG.info("RemoveHost: " + host.getHostName()); this.hostRemovedCount.incrementAndGet(); }
@Override public void onHostReactivated(Host host, HostConnectionPool<?> pool) { LOG.info("Reactivating " + host.getHostName()); this.hostReactivatedCount.incrementAndGet(); }
@Override public void onHostReactivated(Host host, HostConnectionPool<?> pool) { LOG.info("Reactivating " + host.getHostName()); this.hostReactivatedCount.incrementAndGet(); }
@Override public void onHostAdded(Host host, HostConnectionPool<?> pool) { LOG.info("AddHost: " + host.getHostName()); this.hostAddedCount.incrementAndGet(); }
@Override public void onHostRemoved(Host host) { LOG.info("RemoveHost: " + host.getHostName()); this.hostRemovedCount.incrementAndGet(); }
@Override public void onHostAdded(Host host, HostConnectionPool<?> pool) { LOG.info("AddHost: " + host.getHostName()); this.hostAddedCount.incrementAndGet(); }
@Override public String apply(HostConnectionPool<CL> host) { return host.getHost().getHostName(); } }), ","))
@Override public String apply(HostConnectionPool<CL> host) { return host.getHost().getHostName(); } }), ","))
@Override public String toString() { return String.format(NAME_FORMAT, getHost().getHostName(), id); }
@Override public String toString() { return String.format(NAME_FORMAT, getHost().getHostName(), id); }
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); }
public DataStaxClientResponseData(String response, int size, OperationResult<?> result, Object key, Map<?, ?> kv) { super(response, size, (result == null) ? "" : result.getHost().getHostName(), result != null ? result.getLatency(TimeUnit.MILLISECONDS) : 0, key, kv); } }
public AstyanaxResponseData(String response, int size, OperationResult<?> result, Object key, Map<?, ?> kv) { super(response, size, (result == null) ? "" : result.getHost().getHostName(), result != null ? result.getLatency(TimeUnit.MILLISECONDS) : 0, key, kv); } }
public DataStaxClientResponseData(String response, int size, OperationResult<?> result, Object key, Object cn, Object value) { super(response, size, EXECUTED_ON + (result != null ? result.getHost().getHostName() : ""), (result != null ? result .getLatency(TimeUnit.MILLISECONDS) : 0), key, cn, value); }
public AstyanaxResponseData(String response, int size, OperationResult<?> result) { super(response, size, EXECUTED_ON + result != null ? result.getHost().getHostName() : "", result != null ? result.getLatency(TimeUnit.MILLISECONDS) : 0); }
public AstyanaxResponseData(String response, int size, OperationResult<?> result, Object key, Object cn, Object value) { super(response, size, EXECUTED_ON + (result != null ? result.getHost().getHostName() : ""), (result != null ? result.getLatency(TimeUnit.MILLISECONDS) : 0), key, cn, value); }
@Override public boolean apply(Host host) { Host foundHost = lookup.get(host.getHostName()); if (foundHost == null) { for (String addr : host.getAlternateIpAddresses()) { foundHost = lookup.get(addr); if (foundHost != null) { break; } } } if (foundHost != null) { host.setTokenRanges(foundHost.getTokenRanges()); return true; } return false; } }));