public abstract class BaseQuery<T extends Comparable<T>> extends Object implements Query<T>
Modifier and Type | Field and Description |
---|---|
static String |
QUERYID |
DATASOURCE_METADATA, GROUP_BY, SEARCH, SEGMENT_METADATA, SELECT, TIME_BOUNDARY, TIMESERIES, TOPN
Constructor and Description |
---|
BaseQuery(DataSource dataSource,
QuerySegmentSpec querySegmentSpec,
boolean descending,
Map<String,Object> context) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
computeOverridenContext(Map<String,Object> overrides) |
boolean |
equals(Object o) |
Map<String,Object> |
getContext() |
boolean |
getContextBoolean(String key,
boolean defaultValue) |
static <T> boolean |
getContextBySegment(Query<T> query,
boolean defaultValue) |
static <T> boolean |
getContextFinalize(Query<T> query,
boolean defaultValue) |
static <T> boolean |
getContextPopulateCache(Query<T> query,
boolean defaultValue) |
static <T> int |
getContextPriority(Query<T> query,
int defaultValue) |
static <T> int |
getContextUncoveredIntervalsLimit(Query<T> query,
int defaultValue) |
static <T> boolean |
getContextUseCache(Query<T> query,
boolean defaultValue) |
<ContextType> |
getContextValue(String key) |
<ContextType> |
getContextValue(String key,
ContextType defaultValue) |
DataSource |
getDataSource() |
org.joda.time.Duration |
getDuration() |
String |
getId() |
List<org.joda.time.Interval> |
getIntervals() |
QuerySegmentSpec |
getQuerySegmentSpec() |
com.google.common.collect.Ordering<T> |
getResultOrdering() |
int |
hashCode() |
boolean |
isDescending() |
Sequence<T> |
run(QueryRunner<T> runner,
Map<String,Object> context) |
Sequence<T> |
run(QuerySegmentWalker walker,
Map<String,Object> context) |
Query |
withId(String id) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getFilter, getType, hasFilters, withDataSource, withOverriddenContext, withQuerySegmentSpec
public static final String QUERYID
public BaseQuery(DataSource dataSource, QuerySegmentSpec querySegmentSpec, boolean descending, Map<String,Object> context)
public static <T> int getContextPriority(Query<T> query, int defaultValue)
public static <T> boolean getContextBySegment(Query<T> query, boolean defaultValue)
public static <T> boolean getContextPopulateCache(Query<T> query, boolean defaultValue)
public static <T> boolean getContextUseCache(Query<T> query, boolean defaultValue)
public static <T> boolean getContextFinalize(Query<T> query, boolean defaultValue)
public static <T> int getContextUncoveredIntervalsLimit(Query<T> query, int defaultValue)
public DataSource getDataSource()
getDataSource
in interface Query<T extends Comparable<T>>
public boolean isDescending()
isDescending
in interface Query<T extends Comparable<T>>
public QuerySegmentSpec getQuerySegmentSpec()
public Sequence<T> run(QuerySegmentWalker walker, Map<String,Object> context)
run
in interface Query<T extends Comparable<T>>
public Sequence<T> run(QueryRunner<T> runner, Map<String,Object> context)
run
in interface Query<T extends Comparable<T>>
public List<org.joda.time.Interval> getIntervals()
getIntervals
in interface Query<T extends Comparable<T>>
public org.joda.time.Duration getDuration()
getDuration
in interface Query<T extends Comparable<T>>
public Map<String,Object> getContext()
getContext
in interface Query<T extends Comparable<T>>
public <ContextType> ContextType getContextValue(String key)
getContextValue
in interface Query<T extends Comparable<T>>
public <ContextType> ContextType getContextValue(String key, ContextType defaultValue)
getContextValue
in interface Query<T extends Comparable<T>>
public boolean getContextBoolean(String key, boolean defaultValue)
getContextBoolean
in interface Query<T extends Comparable<T>>
protected Map<String,Object> computeOverridenContext(Map<String,Object> overrides)
public com.google.common.collect.Ordering<T> getResultOrdering()
getResultOrdering
in interface Query<T extends Comparable<T>>
public Query withId(String id)
withId
in interface Query<T extends Comparable<T>>
Copyright © 2011–2017. All rights reserved.