if (log.isInfoEnabled()) {
log.info("Starting shutdown operation on " + CassandraNodeComponent.class.getName() +
" with resource key " + context.getResourceKey());
}
EmsConnection emsConnection = getEmsConnection();
EmsBean storageService = emsConnection.getBean("org.apache.cassandra.db:type=StorageService");
Class[] emptyParams = new Class[0];
if (log.isDebugEnabled()) {
log.debug("Disabling thrift...");
}
EmsOperation operation = storageService.getOperation("stopRPCServer", emptyParams);
operation.invoke((Object[]) emptyParams);
if (log.isDebugEnabled()) {
log.debug("Disabling gossip...");
}
operation = storageService.getOperation("stopGossiping", emptyParams);
operation.invoke((Object[]) emptyParams);
if (log.isDebugEnabled()) {
log.debug("Initiating drain...");
}
operation = storageService.getOperation("drain", emptyParams);
operation.invoke((Object[]) emptyParams);
return stopNode();
}