File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
src/main/java/io/cryostat/net/web/http/generic Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,6 @@ class HealthLivenessGetHandler implements RequestHandler {
31
31
@ Inject
32
32
HealthLivenessGetHandler () {}
33
33
34
- @ Override
35
- public void handle (RoutingContext ctx ) {
36
- ctx .response ().setStatusCode (204 ).end ();
37
- }
38
-
39
34
@ Override
40
35
public ApiVersion apiVersion () {
41
36
return ApiVersion .GENERIC ;
@@ -55,4 +50,25 @@ public HttpMethod httpMethod() {
55
50
public Set <ResourceAction > resourceActions () {
56
51
return ResourceAction .NONE ;
57
52
}
53
+
54
+ @ Override
55
+ public boolean isAsync () {
56
+ // This response handler does not actually block, but we force it to execute on the worker
57
+ // pool so that the status check reports not only that the event loop dispatch thread is
58
+ // alive and responsive, but that the worker pool is also actively servicing requests. If we
59
+ // don't force this then this handler only checks if the event loop is alive, but the worker
60
+ // pool may be blocked or otherwise unresponsive and the application as a whole will not be
61
+ // usable.
62
+ return false ;
63
+ }
64
+
65
+ @ Override
66
+ public boolean isOrdered () {
67
+ return true ;
68
+ }
69
+
70
+ @ Override
71
+ public void handle (RoutingContext ctx ) {
72
+ ctx .response ().setStatusCode (204 ).end ();
73
+ }
58
74
}
You can’t perform that action at this time.
0 commit comments