Class GotLeaderLatchResource
java.lang.Object
org.kiwiproject.curator.leader.resource.GotLeaderLatchResource
@Path("/kiwi/got-leader-latch")
@Produces("application/json")
public class GotLeaderLatchResource
extends Object
JAX-RS resource providing a single endpoint that allows clients to determine whether this service
participates in a leader latch.
Simply make a GET /kiwi/got-leader-latch? request. The question mark is clearly not required but
is perhaps a little more fun depending on your sense of humor, i.e. if you think programmer humor is funny
or terrible.
This resource should, of course, only be registered when the service participates in a leader latch.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseReturns a 204 (No Content) response if available.
-
Constructor Details
-
GotLeaderLatchResource
public GotLeaderLatchResource()
-
-
Method Details
-
gotLeaderLatch
@GET public jakarta.ws.rs.core.Response gotLeaderLatch()Returns a 204 (No Content) response if available. Otherwise, a 404 is returned (though obviously not by this resource).- Returns:
- the response
-