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.KeyThe 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 booleancanDrop()Returns true if this key can be removed to reduce header size when the header would otherwise be too large.StringgetName()booleanincludeInHeader()Whether to return the key, value pair in the response header.ObjectmergeValues(Object oldValue, Object newValue)Merges two values of type T.ObjectreadValue(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.
-
-