public final class VespaHeaders extends Object
Constructor and Description |
---|
VespaHeaders() |
Modifier and Type | Method and Description |
---|---|
static boolean |
benchmarkCoverage(boolean benchmarkOutput,
com.yahoo.jdisc.HeaderFields headers) |
static void |
benchmarkOutput(com.yahoo.jdisc.HeaderFields responseHeaders,
boolean benchmarkCoverage,
Timing t,
com.yahoo.container.logging.HitCounts c,
int errorCount,
Coverage coverage)
Add search benchmark output to the HTTP getHeaders
|
static boolean |
benchmarkOutput(HttpRequest request) |
static int |
getEagerErrorStatus(com.yahoo.processing.request.ErrorMessage mainError,
Iterator<? extends com.yahoo.processing.request.ErrorMessage> allErrors)
Returns 5xx or 4xx if there is any error present in the result, 200 otherwise
|
static int |
getStatus(boolean isSuccess,
com.yahoo.processing.request.ErrorMessage mainError,
Iterator<? extends com.yahoo.processing.request.ErrorMessage> allErrors)
(during normal execution) return 200 unless this is not a success or a 4xx error is requested.
|
public static boolean benchmarkCoverage(boolean benchmarkOutput, com.yahoo.jdisc.HeaderFields headers)
public static boolean benchmarkOutput(HttpRequest request)
public static void benchmarkOutput(com.yahoo.jdisc.HeaderFields responseHeaders, boolean benchmarkCoverage, Timing t, com.yahoo.container.logging.HitCounts c, int errorCount, Coverage coverage)
responseHeaders
- The response to write the headers to.benchmarkCoverage
- True to include coverage headers.t
- The Timing to read data from.c
- The Counts to read data from.errorCount
- The error count.coverage
- The Coverage to read data from.public static int getStatus(boolean isSuccess, com.yahoo.processing.request.ErrorMessage mainError, Iterator<? extends com.yahoo.processing.request.ErrorMessage> allErrors)
isSuccess
- Whether or not the response represents a success.mainError
- The main error of the response, if any.allErrors
- All the errors of the response, if any.public static int getEagerErrorStatus(com.yahoo.processing.request.ErrorMessage mainError, Iterator<? extends com.yahoo.processing.request.ErrorMessage> allErrors)
mainError
- The main error of the response.allErrors
- All the errors of the response, if any.Copyright © 2018. All rights reserved.