@Override
  protected NodeJRLifecycleResponse performOperationOnJiraRiver(
      IJiraRiverMgm river, JRLifecycleRequest req, DiscoveryNode node) throws Exception {
    JRLifecycleCommand command = req.getCommand();
    logger.debug("Go to perform lifecycle command {} on river '{}'", command, req.getRiverName());
    switch (command) {
      case STOP:
        river.stop(true);
        break;
      case RESTART:
        river.restart();
        break;
      default:
        throw new UnsupportedOperationException("Command " + command + " is not supported");
    }

    return new NodeJRLifecycleResponse(node, true);
  }
 @Override
 protected NodeFullUpdateResponse performOperationOnJiraRiver(
     IJiraRiverMgm river, FullUpdateRequest req, DiscoveryNode node) throws Exception {
   logger.debug(
       "Go to schedule full reindex for river '{}' and project {}",
       req.getRiverName(),
       req.getProjectKey());
   String ret = river.forceFullReindex(req.getProjectKey());
   return new NodeFullUpdateResponse(node, true, ret != null, ret);
 }