Package org.kairosdb.client.builder
Class QueryTagBuilder
- java.lang.Object
-
- org.kairosdb.client.builder.AbstractQueryBuilder<QueryTagBuilder>
-
- org.kairosdb.client.builder.QueryTagBuilder
-
public class QueryTagBuilder extends AbstractQueryBuilder<QueryTagBuilder>
Builder used to create the JSON to query tags from KairosDB.
This is similar to a regular query but just returns the tags (no data points) for the range specified. The time range can be specified as absolute or relative. Absolute times are a given point in time. Relative times are relative to now. The end time is not required and defaults to now.
For example, if you specify a relative start time of 30 minutes, all matching data points for the last 30 minutes will be returned. If you specify a relative start time of 30 minutes and a relative end time of 10 minutes, then all matching data points that occurred between the last 30 minutes up to and including the last 10 minutes are returned.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryTagMetricaddMetric(String name)The metric to query tag for.protected com.google.gson.GsonbuildGson()Builds Gson used by this implementationstatic QueryTagBuildergetInstance()Returns a new query tag builder.List<QueryTagMetric>getMetrics()Returns the list metrics to query for tags.-
Methods inherited from class org.kairosdb.client.builder.AbstractQueryBuilder
build, equals, getEndAbsolute, getEndRelative, getStartAbsolute, getStartRelative, hashCode, setEnd, setEnd, setStart, setStart
-
-
-
-
Method Detail
-
buildGson
protected com.google.gson.Gson buildGson()
Description copied from class:AbstractQueryBuilderBuilds Gson used by this implementation- Specified by:
buildGsonin classAbstractQueryBuilder<QueryTagBuilder>
-
getInstance
public static QueryTagBuilder getInstance()
Returns a new query tag builder.- Returns:
- new query tag builder
-
addMetric
public QueryTagMetric addMetric(String name)
The metric to query tag for.- Parameters:
name- metric name- Returns:
- the builder
-
getMetrics
public List<QueryTagMetric> getMetrics()
Returns the list metrics to query for tags.- Returns:
- metrics
-
-