本文整理了Java中com.hazelcast.instance.Node.createJoinRequest()
方法的一些代码示例,展示了Node.createJoinRequest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.createJoinRequest()
方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:createJoinRequest
暂无
代码示例来源:origin: hazelcast/hazelcast-jet
private Address findMasterWithMulticast() {
try {
if (logger.isFineEnabled()) {
logger.fine("Searching for master node. Max tries: " + maxTryCount.get());
}
JoinRequest joinRequest = node.createJoinRequest(false);
while (node.isRunning() && currentTryCount.incrementAndGet() <= maxTryCount.get()) {
joinRequest.setTryCount(currentTryCount.get());
node.multicastService.send(joinRequest);
Address masterAddress = clusterService.getMasterAddress();
if (masterAddress == null) {
//noinspection BusyWait
Thread.sleep(getPublishInterval());
} else {
return masterAddress;
}
}
} catch (final Exception e) {
if (logger != null) {
logger.warning(e);
}
} finally {
currentTryCount.set(0);
}
return null;
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private Address findMasterWithMulticast() {
try {
if (logger.isFineEnabled()) {
logger.fine("Searching for master node. Max tries: " + maxTryCount.get());
}
JoinRequest joinRequest = node.createJoinRequest(false);
while (node.isRunning() && currentTryCount.incrementAndGet() <= maxTryCount.get()) {
joinRequest.setTryCount(currentTryCount.get());
node.multicastService.send(joinRequest);
Address masterAddress = clusterService.getMasterAddress();
if (masterAddress == null) {
//noinspection BusyWait
Thread.sleep(getPublishInterval());
} else {
return masterAddress;
}
}
} catch (final Exception e) {
if (logger != null) {
logger.warning(e);
}
} finally {
currentTryCount.set(0);
}
return null;
}
代码示例来源:origin: hazelcast/hazelcast-jet
/**
* Send join request to {@code toAddress}.
*
* @param toAddress the currently known master address.
* @param withCredentials use cluster credentials
* @return {@code true} if join request was sent successfully, otherwise {@code false}.
*/
public boolean sendJoinRequest(Address toAddress, boolean withCredentials) {
if (toAddress == null) {
toAddress = clusterService.getMasterAddress();
}
JoinRequestOp joinRequest = new JoinRequestOp(node.createJoinRequest(withCredentials));
return nodeEngine.getOperationService().send(joinRequest, toAddress);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
/**
* Send join request to {@code toAddress}.
*
* @param toAddress the currently known master address.
* @param withCredentials use cluster credentials
* @return {@code true} if join request was sent successfully, otherwise {@code false}.
*/
public boolean sendJoinRequest(Address toAddress, boolean withCredentials) {
if (toAddress == null) {
toAddress = clusterService.getMasterAddress();
}
JoinRequestOp joinRequest = new JoinRequestOp(node.createJoinRequest(withCredentials));
return nodeEngine.getOperationService().send(joinRequest, toAddress);
}
内容来源于网络,如有侵权,请联系作者删除!