use of com.netflix.exhibitor.core.state.KillRunningInstance in project exhibitor by soabase.
the class ClusterResource method stopZooKeeper.
@Path("stop")
@GET
@Produces(MediaType.APPLICATION_JSON)
public String stopZooKeeper() throws Exception {
context.getExhibitor().getActivityQueue().add(QueueGroups.MAIN, new KillRunningInstance(context.getExhibitor(), false));
Result result = new Result("OK", true);
return JsonUtil.writeValueAsString(result);
}
use of com.netflix.exhibitor.core.state.KillRunningInstance in project exhibitor by soabase.
the class ClusterResource method stopStartZooKeeper.
@Path("restart")
@GET
@Produces(MediaType.APPLICATION_JSON)
public String stopStartZooKeeper() throws Exception {
context.getExhibitor().getActivityQueue().add(QueueGroups.MAIN, new KillRunningInstance(context.getExhibitor(), true));
Result result = new Result("OK", true);
return JsonUtil.writeValueAsString(result);
}
Aggregations