All Products
Search
Document Center

Time Series Database:SubQuery.Builder

Last Updated:Apr 14, 2022

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

Builder(String metric, Aggregator aggregator)

Use a Metric name and Aggregator type to create a SubQuery.Builder instance

Method Essentials

Qualifier and type

Method and explanation

SubQuery

build()

Build a SubQuery

SubQuery.Builder

downsample(String downsample)

Set a downsample string

SubQuery.Builder

explicitTags()

Enable explicitTags

SubQuery.Builder

explicitTags(boolean explicitTags)

Set the explicitTags status

SubQuery.Builder

filter(Filter filter)

Add a filter

SubQuery.Builder

filter(FilterType type, String tagk, String filter)

Add a filter

SubQuery.Builder

filter(FilterType type, String tagk, String filter, Boolean groupBy)

Add a filter

SubQuery.Builder

rate()

Set whether to enable the differential of values to times

SubQuery.Builder

rate(boolean rate)

Set whether to enable the differential of values to times

SubQuery.Builder

tag(Map<String,String> tags)

Add a Tag key-value pair.

SubQuery.Builder

tag(String tagk, String tagv)

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 name
      filter - 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 name
      filter - 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 name
      tagv - 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