本文整理了Java中com.hazelcast.nio.Address.getInetSocketAddress()
方法的一些代码示例,展示了Address.getInetSocketAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.getInetSocketAddress()
方法的具体详情如下:
包路径:com.hazelcast.nio.Address
类名称:Address
方法名:getInetSocketAddress
暂无
代码示例来源:origin: hazelcast/hazelcast-jet
private boolean isLocalAddress(final Address address) throws UnknownHostException {
final Address thisAddress = node.getThisAddress();
final boolean local = thisAddress.getInetSocketAddress().equals(address.getInetSocketAddress());
if (logger.isFineEnabled()) {
logger.fine(address + " is local? " + local);
}
return local;
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private boolean isLocalAddress(final Address address) throws UnknownHostException {
final Address thisAddress = node.getThisAddress();
final boolean local = thisAddress.getInetSocketAddress().equals(address.getInetSocketAddress());
if (logger.isFineEnabled()) {
logger.fine(address + " is local? " + local);
}
return local;
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public InetSocketAddress getSocketAddress() {
try {
return address.getInetSocketAddress();
} catch (UnknownHostException e) {
if (getLogger() != null) {
getLogger().warning(e);
}
return null;
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
@Override
public InetSocketAddress getSocketAddress() {
try {
return address.getInetSocketAddress();
} catch (UnknownHostException e) {
if (getLogger() != null) {
getLogger().warning(e);
}
return null;
}
}
代码示例来源:origin: com.hazelcast/hazelcast-all
protected ClientConnection createSocketConnection(final Address remoteAddress) throws IOException {
SocketChannel socketChannel = null;
try {
socketChannel = SocketChannel.open();
Socket socket = socketChannel.socket();
bindSocketToPort(socket);
Channel channel = networking.register(socketChannel, true);
channel.connect(remoteAddress.getInetSocketAddress(), connectionTimeoutMillis);
ClientConnection connection
= new ClientConnection(client, connectionIdGen.incrementAndGet(), channel);
socketChannel.configureBlocking(true);
if (socketInterceptor != null) {
socketInterceptor.onConnect(socket);
}
channel.start();
return connection;
} catch (Exception e) {
closeResource(socketChannel);
throw rethrow(e, IOException.class);
}
}
代码示例来源:origin: hazelcast/hazelcast-jet
if (address.isIPv4()) {
tryToConnect(address.getInetSocketAddress(),
ioService.getSocketConnectTimeoutSeconds() * MILLIS_PER_SECOND);
} else if (thisAddress.isIPv6() && thisAddress.getScopeId() != null) {
代码示例来源:origin: com.hazelcast/hazelcast-all
if (address.isIPv4()) {
tryToConnect(address.getInetSocketAddress(),
ioService.getSocketConnectTimeoutSeconds() * MILLIS_PER_SECOND);
} else if (thisAddress.isIPv6() && thisAddress.getScopeId() != null) {
内容来源于网络,如有侵权,请联系作者删除!