Class name: com.aliyun.hitsdb.client.value.request.SubQuery.Builder
java.lang.Object
com.aliyun.hitsdb.client.value.request.SubQuery.Builder
- Enclosing class:
SubQuery
public static class SubQuery.Builder extends Object
Builder Essentials
Builder and explanation |
Use a Metric name and Aggregator type to create a SubQuery.Builder instance |
Method Essentials
Qualifier and type | Method and explanation |
|
Build a SubQuery |
|
Set a downsample string |
|
Enable explicitTags |
|
Set the explicitTags status |
|
Add a filter |
|
Add a filter |
|
Add a filter |
|
Set whether to enable the differential of values to times |
|
Set whether to enable the differential of values to times |
|
Add a Tag key-value pair. |
|
Add a Tag key-value pair. |
Method of inheritance from a class java.lang.Object
clone
, equals
, finalize
, getClass
, hashCode
, notify
, notifyAll
, toString
, wait
Builder details
Builder
public Builder(String metric, Aggregator aggregator)
Use a Metric name and Aggregator type to create a SubQuery.Builder instance.
Method details
rate
public SubQuery.Builder rate()
Set whether to enable the differential of values to times. The default setting is Disabled.filter
public SubQuery.Builder filter(FilterType type, String tagk, String filter, Boolean groupBy)
Add a filtering condition of the Filter. The Filter and Tags cannot share fields.- Parameters:
type
- Instance of the Query classthe FilterType. Indicates the Filter type.tagk
- Tag namefilter
- The Tag values to be filtered.groupBy
- false indicates aggregation. true indicates no aggregation.- Return:
- Builder
filter
public SubQuery.Builder filter(Filter filter)
Add a filtering condition of the Filter. The Filter and Tags cannot share fields.- Parameters:
filter
- Filter instance.- Return:
- Builder
filter
public SubQuery.Builder filter(FilterType type, String tagk, String filter)
Add a filtering condition of the Filter. The Filter and Tags cannot share fields.- Parameters:
type
- Instance of the Query classthe FilterType. Indicates the Filter type.tagk
- Tag namefilter
- The Tag values to be filtered.- Return:
- Builder
rate
public SubQuery.Builder rate(boolean rate)
Set to query the rate status.- Parameters:
rate
- boolean value. True indicates calculating the differential of values to times. False, the default value, indicates not calculating the differential.- Return:
- Builder
downsample
public SubQuery.Builder downsample(String downsample)
Set the downsampling string- Parameters:
downsample
- Downsampling string- Return:
- Builder
tag
public SubQuery.Builder tag(String tagk, String tagv)
Add a Tag key-value pair.- Parameters:
tagk
- Tag nametagv
- Tag value- Return:
- Builder
tag
public SubQuery.Builder tag(Map<String,String> tags)
Add multiple Tag key-value pairs- Parameters:
tags
- Tag key-value pair in the Map form.- Return:
- Builder
explicitTags
public SubQuery.Builder explicitTags()
Enable explicitTags. In other words, explicitTags is set to True.explicitTags
public SubQuery.Builder explicitTags(boolean explicitTags)
Set the explicitTags status.build
public SubQuery build()
Builds a SubQuery instance