@Override protected Object doExecute() throws Exception { org.apache.karaf.cellar.core.control.ShutdownCommand command = new org.apache.karaf.cellar.core.control.ShutdownCommand(clusterManager.generateId()); Set<Node> recipientList = clusterManager.listNodes(); command.setDestination(recipientList); command.setHalt(halt); System.out.println("!! Cluster shutdown !!"); executionContext.execute(command); return null; }
@Override public void shutdown(boolean poweroff) throws Exception { ShutdownCommand command = new ShutdownCommand(clusterManager.generateId()); Set<Node> nodes = clusterManager.listNodes(); command.setDestination(nodes); command.setHalt(poweroff); executionContext.execute(command); }
@Override public void shutdown(boolean poweroff) throws Exception { ShutdownCommand command = new ShutdownCommand(clusterManager.generateId()); Set<Node> nodes = clusterManager.listNodes(); command.setDestination(nodes); command.setHalt(poweroff); executionContext.execute(command); }