程序包 com.cnosdb.dto

类 BatchPoints.Builder

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

public static final class BatchPoints.Builder extends Object
The Builder to create a new BatchPoints instance.
  • 方法详细资料

    • retentionPolicy

      public BatchPoints.Builder retentionPolicy(String policy)
      The retentionPolicy to use.
      参数:
      policy - the retentionPolicy to use
      返回:
      the Builder instance
    • tag

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

      public BatchPoints.Builder point(Point pointToAdd)
      Add a Point to this set of points.
      参数:
      pointToAdd - the Point to add
      返回:
      the Builder instance
    • points

      public BatchPoints.Builder points(Point... pointsToAdd)
      Add a set of Points to this set of points.
      参数:
      pointsToAdd - the Points to add
      返回:
      the Builder instance
    • points

      public BatchPoints.Builder points(Collection<Point> pointsToAdd)
      Add a set of Points to this set of points.
      参数:
      pointsToAdd - the Points to add
      返回:
      the Builder instance
    • consistency

      public BatchPoints.Builder consistency(CnosDB.ConsistencyLevel consistencyLevel)
      Set the ConsistencyLevel to use. If not given it defaults to CnosDB.ConsistencyLevel.ONE
      参数:
      consistencyLevel - the ConsistencyLevel
      返回:
      the Builder instance
    • precision

      public BatchPoints.Builder precision(TimeUnit precision)
      Set the time precision to use for the whole batch. If unspecified, will default to TimeUnit.NANOSECONDS
      参数:
      precision - the precision of the points
      返回:
      the Builder instance
    • build

      public BatchPoints build()
      Create a new BatchPoints instance.
      返回:
      the created BatchPoints.