public final class VipStatusHandler extends ThreadedHttpRequestHandler
Modifier and Type | Class and Description |
---|---|
(package private) class |
VipStatusHandler.StatusResponse |
ThreadedHttpRequestHandler.LazyContentChannel
Modifier and Type | Field and Description |
---|---|
private boolean |
accessDisk |
private static Logger |
log |
private boolean |
noSearchBackendsImpliesOutOfService |
private static String |
NUM_REQUESTS_METRIC |
(package private) static String |
OK_MESSAGE |
private boolean |
previouslyInRotation |
private File |
statusFile |
(package private) static byte[] |
VIP_OK |
private VipStatus |
vipStatus |
CONTENT_TYPE, DATE
metric
Constructor and Description |
---|
VipStatusHandler(Executor executor,
com.yahoo.container.core.VipStatusConfig vipConfig,
com.yahoo.jdisc.Metric metric) |
VipStatusHandler(Executor executor,
com.yahoo.container.core.VipStatusConfig vipConfig,
com.yahoo.jdisc.Metric metric,
VipStatus vipStatus) |
VipStatusHandler(com.yahoo.container.core.VipStatusConfig vipConfig,
com.yahoo.jdisc.Metric metric,
VipStatus vipStatus)
Create this with a dedicated thread pool to avoid returning an error to VIPs when the regular thread pool is
out of capacity.
|
Modifier and Type | Method and Description |
---|---|
HttpResponse |
handle(HttpRequest request)
Override this to implement a synchronous style handler.
|
private void |
updateAndLogRotationState() |
addDateHeader, asHttpRequest, createLoggingCompletionHandler, handle, handleRequest
getTimeout, handleRequest
currentState, destroy, refer, release, retainCount
private static final Logger log
private static final String NUM_REQUESTS_METRIC
private final boolean accessDisk
private final File statusFile
private final VipStatus vipStatus
private final boolean noSearchBackendsImpliesOutOfService
private volatile boolean previouslyInRotation
static final String OK_MESSAGE
static final byte[] VIP_OK
@Inject public VipStatusHandler(com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric, VipStatus vipStatus)
public VipStatusHandler(Executor executor, com.yahoo.container.core.VipStatusConfig vipConfig, com.yahoo.jdisc.Metric metric)
public HttpResponse handle(HttpRequest request)
ThreadedHttpRequestHandler
handle
in class ThreadedHttpRequestHandler
request
- incoming HTTP requestprivate void updateAndLogRotationState()
Copyright © 2017. All rights reserved.