程序包 com.cnosdb.dto

类 Point.Builder

java.lang.Object
com.cnosdb.dto.Point.Builder
封闭类:
Point

public static final class Point.Builder extends Object
Builder for a new Point.
作者:
stefan.majer [at] gmail.com
  • 方法详细资料

    • tag

      public Point.Builder tag(String tagName, String value)
      Add a tag to this point.
      参数:
      tagName - the tag name
      value - the tag value
      返回:
      the Builder instance.
    • tag

      public Point.Builder tag(Map<String,String> tagsToAdd)
      Add a Map of tags to add to this point.
      参数:
      tagsToAdd - the Map of tags to add
      返回:
      the Builder instance.
    • field

      @Deprecated public Point.Builder field(String field, Object value)
      已过时。
      Add a field to this point.
      参数:
      field - the field name
      value - the value of this field
      返回:
      the Builder instance.
    • addField

      public Point.Builder addField(String field, boolean value)
    • addField

      public Point.Builder addField(String field, long value)
    • addField

      public Point.Builder addField(String field, double value)
    • addField

      public Point.Builder addField(String field, int value)
    • addField

      public Point.Builder addField(String field, float value)
    • addField

      public Point.Builder addField(String field, short value)
    • addField

      public Point.Builder addField(String field, Number value)
    • addField

      public Point.Builder addField(String field, String value)
    • fields

      public Point.Builder fields(Map<String,Object> fieldsToAdd)
      Add a Map of fields to this point.
      参数:
      fieldsToAdd - the fields to add
      返回:
      the Builder instance.
    • time

      public Point.Builder time(Number timeToSet, TimeUnit precisionToSet)
      Add a time to this point.
      参数:
      timeToSet - the time for this point
      precisionToSet - the TimeUnit
      返回:
      the Builder instance.
    • time

      public Point.Builder time(long timeToSet, TimeUnit precisionToSet)
      Add a time to this point as long. only kept for binary compatibility with previous releases.
      参数:
      timeToSet - the time for this point as long
      precisionToSet - the TimeUnit
      返回:
      the Builder instance.
    • time

      public Point.Builder time(Long timeToSet, TimeUnit precisionToSet)
      Add a time to this point as Long. only kept for binary compatibility with previous releases.
      参数:
      timeToSet - the time for this point as Long
      precisionToSet - the TimeUnit
      返回:
      the Builder instance.
    • hasFields

      public boolean hasFields()
      Does this builder contain any fields?
      返回:
      true, if the builder contains any fields, false otherwise.
    • addFieldsFromPOJO

      public Point.Builder addFieldsFromPOJO(Object pojo)
      Adds field map from object by reflection using Column annotation.
      参数:
      pojo - POJO Object with annotation Column on fields
      返回:
      the Builder instance
    • build

      public Point build()
      Create a new Point.
      返回:
      the newly created Point.