Class LeaderResource

java.lang.Object
org.kiwiproject.curator.leader.resource.LeaderResource

@Path("/kiwi/leader-latch") @Produces("application/json") public class LeaderResource extends Object
JAX-RS resource providing endpoints for checking leadership and participant information.
  • Constructor Details

  • Method Details

    • hasLeadership

      @GET @Path("/leader") public jakarta.ws.rs.core.Response hasLeadership()
      Checks whether this service is the latch leader.
      Returns:
      the JSON Response
    • getLatchState

      @GET @Path("/latch") public jakarta.ws.rs.core.Response getLatchState()
      Get information about the leader latch that this service participates in.
      Returns:
      the JSON Response