List of usage examples for org.apache.cassandra.tools BootstrapMonitor BootstrapMonitor
public BootstrapMonitor(PrintStream out)
From source file:com.wenyu.utils.ClusterToolNodeProbe.java
License:Apache License
public void resumeBootstrap(PrintStream out) throws IOException { BootstrapMonitor monitor = new BootstrapMonitor(out); try {//from w w w. ja va2 s . c om jmxc.addConnectionNotificationListener(monitor, null, null); ssProxy.addNotificationListener(monitor, null, null); if (ssProxy.resumeBootstrap()) { out.println("Resuming bootstrap"); monitor.awaitCompletion(); } else { out.println("Node is already bootstrapped."); } } catch (Exception e) { throw new IOException(e); } finally { try { ssProxy.removeNotificationListener(monitor); jmxc.removeConnectionNotificationListener(monitor); } catch (Throwable e) { out.println("Exception occurred during clean-up. " + e); } } }