本文整理了Java中com.netflix.dyno.connectionpool.Host.isUp()
方法的一些代码示例,展示了Host.isUp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Host.isUp()
方法的具体详情如下:
包路径:com.netflix.dyno.connectionpool.Host
类名称:Host
方法名:isUp
暂无
代码示例来源:origin: Netflix/conductor
@Override
public List<Host> getHosts() {
List<Host> hosts = super.getHosts();
List<Host> updatedHosts = new ArrayList<>(hosts.size());
hosts.forEach(host -> {
updatedHosts.add(new Host(host.getHostName(), host.getIpAddress(), readConnPort, host.getRack(), host.getDatacenter(), host.isUp() ? Host.Status.Up : Host.Status.Down));
});
return updatedHosts;
}
};
代码示例来源:origin: com.netflix.dyno/dyno-core
@Override
public boolean apply(Host x) {
return x.isUp();
}
}));
代码示例来源:origin: com.netflix.dyno/dyno-core
public void add(Collection<Host> hosts) {
for (Host host : hosts) {
if (!host.isUp()) {
throw new DynoConnectException("Cannot add host that is DOWN");
}
hostList.add(host);
}
}
代码示例来源:origin: com.netflix.dyno/dyno-core
private boolean isConnectionPoolActive(HostConnectionPool<CL> hPool) {
if (hPool == null) {
return false;
}
Host host = hPool.getHost();
if (!host.isUp()) {
return false;
} else {
return hPool.isActive();
}
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public List<Host> getHosts() {
List<Host> hosts = super.getHosts();
List<Host> updatedHosts = new ArrayList<>(hosts.size());
hosts.forEach(host -> {
updatedHosts.add(new Host(host.getHostName(), host.getIpAddress(), readConnPort, host.getRack(), host.getDatacenter(), host.isUp() ? Host.Status.Up : Host.Status.Down));
});
return updatedHosts;
}
};
代码示例来源:origin: com.netflix.dyno/dyno-core
if (!host.isUp()) {
Logger.info("Host: " + host + " is marked as down, evicting host from reconnection pool");
reconnectingPools.remove(host);
代码示例来源:origin: com.netflix.dyno/dyno-core
@Override
public HostConnectionPool<CL> getPoolForOperation(BaseOperation<CL, ?> op, String hashtag) throws NoAvailableHostsException {
int numTries = circularList.getSize();
HostConnectionPool<CL> lastPool = null;
while (numTries > 0) {
lastPool = getNextConnectionPool();
numTries--;
if (lastPool.isActive() && lastPool.getHost().isUp()) {
return lastPool;
}
}
// If we reach here then we haven't found an active pool. Return the last inactive pool anyways,
// and HostSelectionWithFallback can choose a fallback pool from another dc
return lastPool;
}
代码示例来源:origin: com.netflix.dyno/dyno-core
if (host.isUp()) {
hostsUpFromHostSupplier.add(host);
} else {
if (hostFromHostSupplier.isUp()) {
Host hostFromTokenMapSupplier = allHostSetFromTokenMapSupplier.get(hostFromHostSupplier);
内容来源于网络,如有侵权,请联系作者删除!