All Products
Search
Document Center

Point.MetricBuilder

Last Updated: May 19, 2022

Class name: com.aliyun.hitsdb.client.value.request.Point.MetricBuilder

java.lang.Object

com.aliyun.hitsdb.client.value.request.Point.MetricBuilder

Enclosing class:
Point
public static class Point.MetricBuilder
extends Object

Builder Essentials

Builder and explanation

MetricBuilder()The builder of Point

MetricBuilder(String metric)The builder of Point, with Metric being the parameter.

Method Essentials

Qualifier and type

Method and explanation

Point.MetricBuilder

aggregator(String aggregator)

Set the Aggregator parameters

Point

build()

Build a time point

Point

build(boolean checkPoint)

Build a time point

Point.MetricBuilder

tag(Map<String,String> tags)

Add a group of Tag key-value pairs

Point.MetricBuilder

tag(String tagName,String value)

Add a group of Tag key-value pairs

Point.MetricBuilder

timestamp(Date date)

Set the timestamp. The timestamp can be seconds or milliseconds.

Point.MetricBuilder

timestamp(long timestamp)

Set the timestamp. The timestamp can be seconds or milliseconds.

Point.MetricBuilder

value(Date date,Number value)

Set the time and value of the time point.

Point.MetricBuilder

value(long timestamp,Number value)

Set the value of the time point.

Point.MetricBuilder

value(Number value)

Set the value of the time point.

Point.MetricBuilder

version(Long version)

Set the version of the time point value

Method of inheritance from a class java.lang. Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait

  • Builder details

    • MetricBuilder

      public MetricBuilder()
    • MetricBuilder

      public MetricBuilder(String metric)
  • Method details

    • tag

      public Point.MetricBuilder tag(String tagName,
                              String value)
      Add a Tag key-value pair.
      Parameters:
      tagName - Tag name
      value - Tag value
      Return:
      MetricBuilder
    • tag

      public Point.MetricBuilder tag(Map<String,String> tags)
      Add a Tag key-value pair.
      Parameters:
      tags - Map comprised of Tag key-value pairs.
      Return:
      MetricBuilder
    • aggregator

      public Point.MetricBuilder aggregator(String aggregator)
      Set the Aggregator value
      Parameters:
      aggregator - Instance of Aggregator enumeration
      Return:
      MetricBuilder
    • timestamp

      public Point.MetricBuilder timestamp(long timestamp)
      Set the timestamp. The timestamp can be seconds or milliseconds.
      Parameters:
      timestamp - Timestamp
      Return:
      MetricBuilder
    • timestamp

      public Point.MetricBuilder timestamp(Date date)
      Set the timestamp. The timestamp can be seconds or milliseconds.
      Parameters:
      date - Time displayed by java.util.Date
      Return:
      MetricBuilder
    • value

      public Point.MetricBuilder value(Number value)
      Set the value of the time point.
      Parameters:
      value - value
      Return:
      MetricBuilder
    • value

      public Point.MetricBuilder value(long timestamp,
                                  Number value)
      Set the time and value of the time point.
      Parameters:
      timestamp - Timestamp, in seconds or milliseconds.
      value - value. Type can be: double, long, int
      Return:
      MetricBuilder
    • value

      public Point.MetricBuilder value(Date date,
                                  Number value)
      Set the time and value of the time point.
      Parameters:
      timestamp - Time displayed by java.util.Date
      value - value. Type can be: double, long, int
      Return:
      MetricBuilder
    • granularity

      public Point.MetricBuilder granularity(Granularity granularity)
    • version

      public Point.MetricBuilder version(Long version)
    • build

      public Point build()
      Build a time point
      Return:
      Point
    • build

      public Point build(boolean checkPoint)
      Build a time point