public class EtagCacheResponseProcessor extends Object implements FullResponseProcessor
Constructor and Description |
---|
EtagCacheResponseProcessor(ResponseProcessor next,
String cacheKey,
TupleDataCache<String,String,String> dataCache,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
HttpErrorCallback |
getErrorCallback(DruidAggregationQuery<?> druidQuery)
Callback for handling http errors.
|
FailureCallback |
getFailureCallback(DruidAggregationQuery<?> druidQuery)
Callback handler for unexpected failures.
|
ResponseContext |
getResponseContext()
The response context allows state to be injected from construction and visible across response processor
layers as necessary.
|
void |
processResponse(com.fasterxml.jackson.databind.JsonNode json,
DruidAggregationQuery<?> druidQuery,
LoggingContext metadata)
Process the response json and respond to the original web request.
|
public EtagCacheResponseProcessor(@NotNull ResponseProcessor next, @NotNull String cacheKey, @NotNull TupleDataCache<String,String,String> dataCache, @NotNull com.fasterxml.jackson.databind.ObjectMapper mapper)
next
- Next ResponseProcessor in the chaincacheKey
- Key into which to write a cache entrydataCache
- The cache into which to write a cache entrymapper
- An object mapper to use for processing Jsonpublic ResponseContext getResponseContext()
ResponseProcessor
getResponseContext
in interface ResponseProcessor
public FailureCallback getFailureCallback(DruidAggregationQuery<?> druidQuery)
ResponseProcessor
getFailureCallback
in interface ResponseProcessor
druidQuery
- The query associated with this failurepublic HttpErrorCallback getErrorCallback(DruidAggregationQuery<?> druidQuery)
ResponseProcessor
getErrorCallback
in interface ResponseProcessor
druidQuery
- The query associated with this errorpublic void processResponse(com.fasterxml.jackson.databind.JsonNode json, DruidAggregationQuery<?> druidQuery, LoggingContext metadata)
ResponseProcessor
processResponse
in interface ResponseProcessor
json
- The json representing a druid data responsedruidQuery
- The query with the schema for processing this responsemetadata
- The LoggingContext to useCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.