Record Class WindowAssigner.Tumbling

java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.pipeline.WindowAssigner.Tumbling
Record Components:
sizeMs - the window size in milliseconds; > 0
startMs - the alignment epoch, typically the query's start time in epoch milliseconds
All Implemented Interfaces:
WindowAssigner
Enclosing interface:
WindowAssigner

public static record WindowAssigner.Tumbling(long sizeMs, long startMs) extends Record implements WindowAssigner
Fixed-size, non-overlapping windows aligned to startMs. When built from a TimeWindow in MONTHS or YEARS, boundaries use the unit's average duration and do not align with the calendar; the engine resolves calendar alignment before constructing this assigner.
  • Constructor Details

    • Tumbling

      public Tumbling(long sizeMs, long startMs)
      Creates an instance of a Tumbling record class.
      Parameters:
      sizeMs - the value for the sizeMs record component
      startMs - the value for the startMs record component
  • Method Details

    • assignWindow

      public long assignWindow(long timestamp)
      Description copied from interface: WindowAssigner
      Assigns a timestamp to the start of its window.
      Specified by:
      assignWindow in interface WindowAssigner
      Parameters:
      timestamp - the event timestamp in epoch milliseconds
      Returns:
      the window start in epoch milliseconds; WindowAssigner.Raw returns the input
    • windowSize

      public long windowSize()
      Description copied from interface: WindowAssigner
      Returns the window size in milliseconds; 0 means one window per event and only WindowAssigner.Raw returns it.
      Specified by:
      windowSize in interface WindowAssigner
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sizeMs

      public long sizeMs()
      Returns the value of the sizeMs record component.
      Returns:
      the value of the sizeMs record component
    • startMs

      public long startMs()
      Returns the value of the startMs record component.
      Returns:
      the value of the startMs record component