@POST @Path("/setLeader") public Map setLeader(@QueryParam("shardId") String shardId) { Map<Object, Object> result = new HashMap<>(); try { GondolaApplication.getRoutingFilter().getGondola().getShard(shardId).forceLeader(5000); result.put("success", true); } catch (Exception e) { result.put("success", false); result.put("reason", e.getMessage()); } return result; }