org.apache.ignite.Ignition.restart()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中org.apache.ignite.Ignition.restart()方法的一些代码示例,展示了Ignition.restart()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ignition.restart()方法的具体详情如下:
包路径:org.apache.ignite.Ignition
类名称:Ignition
方法名:restart

Ignition.restart介绍

[英]Restarts all started grids. If cancel flag is set to true then all jobs currently executing on the local node will be interrupted. If wait parameter is set to true then grid will wait for all tasks to be finished.

Note: it is usually safer and more appropriate to stop grid instances individually instead of blanket operation. In most cases, the party that started the grid instance should be responsible for stopping it.

Note also that restarting functionality only works with the tools that specifically support Ignite's protocol for restarting. Currently only standard ignite.{sh|bat} scripts support restarting of JVM Ignite's process.
[中]重新启动所有已启动的网格。如果取消标志设置为true,则当前在本地节点上执行的所有作业都将中断。若wait参数设置为true,则网格将等待所有任务完成。
注意:单独停止网格实例通常比整体操作更安全、更合适。在大多数情况下,启动网格实例的一方应该负责停止它。
还请注意,重新启动功能仅适用于专门支持Ignite重新启动协议的工具。目前只有标准点火。{sh|bat}脚本支持重新启动JVM Ignite的进程。

代码示例

代码示例来源:origin: apache/ignite

@Override public void run() {
    Ignition.restart(true);
  }
}, "grid-restarter").start();

代码示例来源:origin: org.apache.ignite/ignite-core

@Override public void run() {
    Ignition.restart(true);
  }
}, "grid-restarter").start();

代码示例来源:origin: org.hibernate.ogm/hibernate-ogm-ignite

private void restart() {
  if ( cacheManager.isRestartEnabled() ) {
    Ignition.restart( false );
  }
  else {
    start();
  }
}

相关文章