@Test public void doubleRing() throws Exception { new Expectations() { { doubleRing.backup(); doubleRing.doubleSlots(); } }; Response response = resource.doubleRing(); assertEquals(200, response.getStatus()); }
@GET @Path("/double_ring") public Response doubleRing() throws IOException, ClassNotFoundException { try { metrics.incDoubleRing(); doubleRing.backup(); doubleRing.doubleSlots(); } catch (Throwable th) { logger.error("Error in doubling the ring...", th); doubleRing.restore(); throw new RuntimeException(th); } return Response.status(200).build(); }
CassandraConfig { @GET @Path("/double_ring") public Response doubleRing() throws IOException, ClassNotFoundException { try { metrics.incDoubleRing(); doubleRing.backup(); doubleRing.doubleSlots(); } catch (Throwable th) { logger.error("Error in doubling the ring...", th); doubleRing.restore(); throw new RuntimeException(th); } return Response.status(200).build(); } }
CassandraConfig { @GET @Path("/double_ring") public Response doubleRing() throws IOException, ClassNotFoundException { try { metrics.incDoubleRing(); doubleRing.backup(); doubleRing.doubleSlots(); } catch (Throwable th) { logger.error("Error in doubling the ring...", th); doubleRing.restore(); throw new RuntimeException(th); } return Response.status(200).build(); } @Inject  CassandraConfig(PriamServer server, DoubleRing doubleRing, CassMonitorMetrics metrics); }
CassandraConfig { @GET @Path("/double_ring") public Response doubleRing() throws IOException, ClassNotFoundException { try { metrics.incDoubleRing(); doubleRing.backup(); doubleRing.doubleSlots(); } catch (Throwable th) { logger.error("Error in doubling the ring...", th); doubleRing.restore(); throw new RuntimeException(th); } return Response.status(200).build(); } @Inject  CassandraConfig(PriamServer server, DoubleRing doubleRing, CassMonitorMetrics metrics); @GET @Path("/get_seeds") Response getSeeds(); @GET @Path("/get_token") Response getToken(); @GET @Path("/is_replace_token") Response isReplaceToken(); @GET @Path("/get_replaced_ip") Response getReplacedIp(); @POST @Path("/set_replaced_ip") Response setReplacedIp(@QueryParam("ip") String ip); @GET @Path("/get_extra_env_params") Response getExtraEnvParams(); @GET @Path("/double_ring") Response doubleRing(); }
CassandraConfig { @GET @Path("/double_ring") public Response doubleRing() throws IOException, ClassNotFoundException { try { metrics.incDoubleRing(); doubleRing.backup(); doubleRing.doubleSlots(); } catch (Throwable th) { logger.error("Error in doubling the ring...", th); doubleRing.restore(); throw new RuntimeException(th); } return Response.status(200).build(); } @Inject  CassandraConfig(PriamServer server, DoubleRing doubleRing, CassMonitorMetrics metrics); @GET @Path("/get_seeds") Response getSeeds(); @GET @Path("/get_token") Response getToken(); @GET @Path("/is_replace_token") Response isReplaceToken(); @GET @Path("/get_replaced_ip") Response getReplacedIp(); @POST @Path("/set_replaced_ip") Response setReplacedIp(@QueryParam("ip") String ip); @GET @Path("/get_extra_env_params") Response getExtraEnvParams(); @GET @Path("/double_ring") Response doubleRing();  }