Record Class AggregateFunction.Traits
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.pipeline.AggregateFunction.Traits
- Enclosing interface:
AggregateFunction<ACC>
public static record AggregateFunction.Traits(AggregateFunction.QualityPolicy quality, boolean readsWindow, boolean awaitsNext, boolean readsEdges)
extends Record
What the pipeline needs to know about a fold: how it treats quality, whether
AggregateFunction.open(AggregateFunction.Window)
reads its window (so the pipeline seeds the key and opens a window that has a prior but no
samples), whether time after a window's last sample counts only once AggregateFunction.close(ACC, AggregateFunction.PriorSample) supplies
the sample after the window, and whether it reads the stored samples at its window's edges.
A fold that reads edges is gated like any other, and also: its prior is the last stored
sample before the window of any quality, AggregateFunction.add(ACC, long, Object, QualityCode) also receives the samples the query's
filter refuses (tell them apart by AggregateFunction.Window.admit, never by value), and AggregateFunction.close(ACC, AggregateFunction.PriorSample)
receives the first stored sample after the window of any quality. On a key whose windows take
no edges the pipeline treats it as a plain value fold.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AggregateFunction.TraitsA fold that takes the bounds at its window's edges in every window.static final AggregateFunction.TraitsA gated fold over the samples inside the window. -
Constructor Summary
ConstructorsConstructorDescriptionTraits(AggregateFunction.QualityPolicy quality, boolean readsWindow, boolean awaitsNext) Traits(AggregateFunction.QualityPolicy quality, boolean readsWindow, boolean awaitsNext, boolean readsEdges) Creates an instance of aTraitsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theawaitsNextrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.quality()Returns the value of thequalityrecord component.booleanReturns the value of thereadsEdgesrecord component.booleanReturns the value of thereadsWindowrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
VALUE_FOLD
A gated fold over the samples inside the window. -
EDGE_FOLD
A fold that takes the bounds at its window's edges in every window.
-
-
Constructor Details
-
Traits
-
Traits
public Traits(AggregateFunction.QualityPolicy quality, boolean readsWindow, boolean awaitsNext, boolean readsEdges) Creates an instance of aTraitsrecord class.- Parameters:
quality- the value for thequalityrecord componentreadsWindow- the value for thereadsWindowrecord componentawaitsNext- the value for theawaitsNextrecord componentreadsEdges- the value for thereadsEdgesrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
quality
Returns the value of thequalityrecord component.- Returns:
- the value of the
qualityrecord component
-
readsWindow
public boolean readsWindow()Returns the value of thereadsWindowrecord component.- Returns:
- the value of the
readsWindowrecord component
-
awaitsNext
public boolean awaitsNext()Returns the value of theawaitsNextrecord component.- Returns:
- the value of the
awaitsNextrecord component
-
readsEdges
public boolean readsEdges()Returns the value of thereadsEdgesrecord component.- Returns:
- the value of the
readsEdgesrecord component
-