Package org.apache.druid.query.context
Interface ResponseContext.Key
-
- All Known Implementing Classes:
ResponseContext.AbstractKey
,ResponseContext.BooleanKey
,ResponseContext.CounterKey
,ResponseContext.LongKey
,ResponseContext.StringKey
- Enclosing class:
- ResponseContext
public static interface ResponseContext.Key
The base interface of a response context key. Should be implemented by every context key.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canDrop()
Returns true if this key can be removed to reduce header size when the header would otherwise be too large.String
getName()
boolean
includeInHeader()
Whether to return the key, value pair in the response header.Object
mergeValues(Object oldValue, Object newValue)
Merges two values of type T.Object
readValue(com.fasterxml.jackson.core.JsonParser jp)
Reads a value of this key from a JSON stream.
-
-
-
Method Detail
-
getName
String getName()
-
includeInHeader
boolean includeInHeader()
Whether to return the key, value pair in the response header. If false, the value is for internal use only.
-
readValue
Object readValue(com.fasterxml.jackson.core.JsonParser jp)
Reads a value of this key from a JSON stream. Used byResponseContextDeserializer
.
-
mergeValues
Object mergeValues(Object oldValue, Object newValue)
Merges two values of type T.This method may modify "oldValue" but must not modify "newValue".
-
canDrop
boolean canDrop()
Returns true if this key can be removed to reduce header size when the header would otherwise be too large.
-
-