Class View

  • Direct Known Subclasses:
    AutoValue_View

    @Immutable
    public abstract class View
    extends java.lang.Object
    A View specifies an aggregation and a set of tag keys. The aggregation will be broken down by the unique set of matching tag values for each measure.
    Since:
    0.8
    • Field Detail

      • TAG_KEY_COMPARATOR

        private static final java.util.Comparator<TagKey> TAG_KEY_COMPARATOR
    • Constructor Detail

      • View

        View()
    • Method Detail

      • getName

        public abstract View.Name getName()
        Name of view. Must be unique.
        Since:
        0.8
      • getDescription

        public abstract java.lang.String getDescription()
        More detailed description, for documentation purposes.
        Since:
        0.8
      • getMeasure

        public abstract Measure getMeasure()
        Measure type of this view.
        Since:
        0.8
      • getColumns

        public abstract java.util.List<TagKey> getColumns()
        Columns (a.k.a Tag Keys) to match with the associated Measure.

        Measure will be recorded in a "greedy" way. That is, every view aggregates every measure. This is similar to doing a GROUPBY on view’s columns. Columns must be unique.

        Since:
        0.8
      • create

        public static View create​(View.Name name,
                                  java.lang.String description,
                                  Measure measure,
                                  Aggregation aggregation,
                                  java.util.List<TagKey> columns)
        Constructs a new View.
        Parameters:
        name - the View.Name of view. Must be unique.
        description - the description of view.
        measure - the Measure to be aggregated by this view.
        aggregation - the basic Aggregation that this view will support.
        columns - the TagKeys that this view will aggregate on. Columns should not contain duplicates.
        Returns:
        a new View.
        Since:
        0.13