public class QueryContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
QueryContext.Param
Enumeration of the available query context keys that can be set.
|
Modifier and Type | Field and Description |
---|---|
static Map<QueryContext.Param,Class> |
ACCEPTING_FIELDS |
Map<QueryContext.Param,Object> |
contextMap |
protected long |
sequenceNumber |
protected AtomicLong |
totalQueries |
Modifier | Constructor and Description |
---|---|
|
QueryContext(Map<QueryContext.Param,Object> contextMap)
Constructor.
|
|
QueryContext(Map<QueryContext.Param,Object> contextMap,
AtomicLong totalQueries)
Constructor.
|
protected |
QueryContext(QueryContext copy,
Map<QueryContext.Param,Object> contextMap)
Constructor.
|
public static final Map<QueryContext.Param,Class> ACCEPTING_FIELDS
public final Map<QueryContext.Param,Object> contextMap
protected final AtomicLong totalQueries
protected final long sequenceNumber
public QueryContext(Map<QueryContext.Param,Object> contextMap, AtomicLong totalQueries)
contextMap
- Map of context valuestotalQueries
- Number of queries that this context is attached topublic QueryContext(Map<QueryContext.Param,Object> contextMap)
contextMap
- Map of context valuesprotected QueryContext(QueryContext copy, Map<QueryContext.Param,Object> contextMap)
copy
- QueryContext to gather sequence number and total queries fromcontextMap
- Map of context values to override withpublic static void validateField(QueryContext.Param param, Object value)
param
- Field to evaluatevalue
- Value to evaluatepublic boolean isEmpty()
public QueryContext fork()
protected QueryContext withValue(QueryContext.Param param, Object value)
param
- Field to set in the clonevalue
- Value to set in the clonepublic QueryContext withTimeout(Integer timeout)
public QueryContext withPriority(Integer priority)
public QueryContext withQueryId(String queryId)
public QueryContext withUseCache(Boolean useCache)
public QueryContext withPopulateCache(Boolean populateCache)
public QueryContext withBySegment(Boolean bySegment)
public QueryContext withFinalize(Boolean finalize)
public QueryContext withUncoveredIntervalsLimit(Integer uncoveredIntervalsLimit)
public long getSequenceNumber()
public long getNumberOfQueries()
public Integer getTimeout()
public Integer getPriority()
public String getQueryId()
public Boolean getUseCache()
public Boolean getPopulateCache()
public Boolean getBySegment()
public Boolean getFinalize()
public Integer getUncoveredIntervalsLimit()
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.