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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseGet information about the leader latch that this service participates in.jakarta.ws.rs.core.ResponseChecks whether this service is the latch leader.
-
Constructor Details
-
LeaderResource
-
-
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
-