Class AddArgs

    • Constructor Detail

      • AddArgs

        public AddArgs()
    • Method Detail

      • setRetention

        public AddArgs setRetention​(Duration retention)
        Set the maximum retention period, compared to the maximum existing timestamp, in milliseconds.

        Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series.

        Parameters:
        retention - the retention, must not be null
        Returns:
        the current AddArgs
      • compressed

        public AddArgs compressed()
        Set the series sample's encoding format to COMPRESSED Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series.
        Returns:
        the current AddArgs
      • uncompressed

        public AddArgs uncompressed()
        Set the series sample's encoding format to UNCOMPRESSED Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series.
        Returns:
        the current AddArgs
      • chunkSize

        public AddArgs chunkSize​(int size)
        Sets the memory size, in bytes, allocated for each data chunk. Use it only if you are creating a new time series. It is ignored if you are adding samples to an existing time series.
        Parameters:
        size - the chunk size, between 48 and 1048576
        Returns:
        the current AddArgs
      • onDuplicate

        public AddArgs onDuplicate​(DuplicatePolicy policy)
        Overwrite key and database configuration for DUPLICATE_POLICY, the policy for handling samples with identical timestamps.
        Parameters:
        policy - the policy, must not be null
        Returns:
        the current AddArgs
      • label

        public AddArgs label​(String label,
                             Object value)
        Set a label-value pairs that represent metadata labels of the time series.
        Parameters:
        label - the label, must not be null
        value - the value, must not be null
        Returns:
        the current AddArgs