本文整理了Java中com.hazelcast.instance.Node.reset()
方法的一些代码示例,展示了Node.reset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.reset()
方法的具体详情如下:
包路径:com.hazelcast.instance.Node
类名称:Node
方法名:reset
[英]Resets the internal cluster-state of the Node to be able to make it ready to join a new cluster. After this method is called, a new join process can be triggered by calling #join().
This method is called during merge process after a split-brain is detected.
[中]重置节点的内部群集状态,使其能够准备加入新群集。调用此方法后,可以通过调用#join()来触发新的连接进程。
在检测到分裂的大脑后,在合并过程中调用此方法。
代码示例来源:origin: com.hazelcast/hazelcast-all
private void resetState() {
// reset node and membership state from now on this node won't be joined and won't have a master address
node.reset();
node.getClusterService().reset();
// stop the connection-manager:
// - all socket connections will be closed
// - connection listening thread will stop
// - no new connection will be established
node.connectionManager.stop();
// clear waiting operations in queue and notify invocations to retry
node.nodeEngine.reset();
}
代码示例来源:origin: hazelcast/hazelcast-jet
private void resetState() {
// reset node and membership state from now on this node won't be joined and won't have a master address
node.reset();
node.getClusterService().reset();
node.getNodeExtension().getInternalHotRestartService().resetService(true);
// stop the connection-manager:
// - all socket connections will be closed
// - connection listening thread will stop
// - no new connection will be established
node.connectionManager.stop();
// clear waiting operations in queue and notify invocations to retry
node.nodeEngine.reset();
}
内容来源于网络,如有侵权,请联系作者删除!