本文整理汇总了Java中com.hazelcast.nio.Address.getHost方法的典型用法代码示例。如果您正苦于以下问题:Java Address.getHost方法的具体用法?Java Address.getHost怎么用?Java Address.getHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.Address
的用法示例。
在下文中一共展示了Address.getHost方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import com.hazelcast.nio.Address; //导入方法依赖的package包/类
@Override
public void start() {
Address address = discoveryNode.getPrivateAddress();
String host = address.getHost();
int port = address.getPort();
execute(() -> someRestService.register(applicationScope, host, port));
}
开发者ID:noctarius,项目名称:hazelcast-discovery-spi-demonstration,代码行数:8,代码来源:SomeRestServiceDiscoveryStrategy.java
示例2: destroy
import com.hazelcast.nio.Address; //导入方法依赖的package包/类
@Override
public void destroy() {
Address address = discoveryNode.getPrivateAddress();
String host = address.getHost();
int port = address.getPort();
execute(() -> someRestService.unregister(applicationScope, host, port));
}
开发者ID:noctarius,项目名称:hazelcast-discovery-spi-demonstration,代码行数:8,代码来源:SomeRestServiceDiscoveryStrategy.java
示例3: getBindAddress
import com.hazelcast.nio.Address; //导入方法依赖的package包/类
@Override
public InetSocketAddress getBindAddress() {
Address addr = this.swarmDiscoveryUtil.getMyAddress();
return new InetSocketAddress(addr.getHost(), addr.getPort());
}
开发者ID:bitsofinfo,项目名称:hazelcast-docker-swarm-discovery-spi,代码行数:6,代码来源:SwarmMemberAddressProvider.java
示例4: getPublicAddress
import com.hazelcast.nio.Address; //导入方法依赖的package包/类
@Override
public InetSocketAddress getPublicAddress() {
Address addr = this.swarmDiscoveryUtil.getMyAddress();
return new InetSocketAddress(addr.getHost(), addr.getPort());
}
开发者ID:bitsofinfo,项目名称:hazelcast-docker-swarm-discovery-spi,代码行数:6,代码来源:SwarmMemberAddressProvider.java
示例5: SingleNodeFaultSupplier
import com.hazelcast.nio.Address; //导入方法依赖的package包/类
SingleNodeFaultSupplier(Address failOnAddress, RuntimeException e) {
this.e = e;
this.host = failOnAddress.getHost();
this.port = failOnAddress.getPort();
}