类 AbstractMetricExporter

    • 方法详细资料

      • setEarliestTimestamp

        public void setEarliestTimestamp​(Date earliestTimestamp)
        The earliest time for which data will be exported.
        参数:
        earliestTimestamp - the timestamp to set
      • setIgnoreTimestamps

        public void setIgnoreTimestamps​(boolean ignoreTimestamps)
        Ignore timestamps (export all metrics).
        参数:
        ignoreTimestamps - the flag to set
      • setSendLatest

        public void setSendLatest​(boolean sendLatest)
        Send only the data that changed since the last export.
        参数:
        sendLatest - the flag to set
      • groups

        protected Iterable<Stringgroups()
        Generate a group of metrics to iterate over in the form of a set of Strings (e.g. prefixes). If the metrics to be exported partition into groups identified by a String, subclasses should override this method. Otherwise the default should be fine (iteration over all metrics).
        返回:
        groups of metrics to iterate over (default singleton empty string)
      • write

        protected abstract void write​(String group,
                                      Collection<Metric<?>> values)
        Write the values associated with a group.
        参数:
        group - the group to write
        values - the values to write
      • next

        protected abstract Iterable<Metric<?>> next​(String group)
        Get the next group of metrics to write.
        参数:
        group - the group name to write
        返回:
        some metrics to write