Record Class WindowAssigner.Natural
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.pipeline.WindowAssigner.Natural
- Record Components:
suggestedSizeMs- the engine-resolved size in millisecondsstartMs- the alignment epoch, typically the query's start time in epoch milliseconds
- All Implemented Interfaces:
WindowAssigner
- Enclosing interface:
WindowAssigner
public static record WindowAssigner.Natural(long suggestedSizeMs, long startMs)
extends Record
implements WindowAssigner
Engine-suggested window size for aggregated queries with no explicit window, for example
(endMs - startMs) / returnSize. A non-positive size is treated as a single 1 ms window.-
Nested Class Summary
Nested classes/interfaces inherited from interface WindowAssigner
WindowAssigner.Natural, WindowAssigner.Raw, WindowAssigner.Tumbling -
Constructor Summary
ConstructorsConstructorDescriptionNatural(long suggestedSizeMs, long startMs) Creates an instance of aNaturalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongassignWindow(long timestamp) Assigns a timestamp to the start of its window.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longstartMs()Returns the value of thestartMsrecord component.longReturns the value of thesuggestedSizeMsrecord component.final StringtoString()Returns a string representation of this record class.longReturns the window size in milliseconds;0means one window per event and onlyWindowAssigner.Rawreturns it.
-
Constructor Details
-
Natural
public Natural(long suggestedSizeMs, long startMs) Creates an instance of aNaturalrecord class.- Parameters:
suggestedSizeMs- the value for thesuggestedSizeMsrecord componentstartMs- the value for thestartMsrecord component
-
-
Method Details
-
assignWindow
public long assignWindow(long timestamp) Description copied from interface:WindowAssignerAssigns a timestamp to the start of its window.- Specified by:
assignWindowin interfaceWindowAssigner- Parameters:
timestamp- the event timestamp in epoch milliseconds- Returns:
- the window start in epoch milliseconds;
WindowAssigner.Rawreturns the input
-
windowSize
public long windowSize()Description copied from interface:WindowAssignerReturns the window size in milliseconds;0means one window per event and onlyWindowAssigner.Rawreturns it.- Specified by:
windowSizein interfaceWindowAssigner
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
suggestedSizeMs
public long suggestedSizeMs()Returns the value of thesuggestedSizeMsrecord component.- Returns:
- the value of the
suggestedSizeMsrecord component
-
startMs
-