Record Class NativeQueryContext
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.NativeQueryContext
- Record Components:
directives- the directive for each key the engine computes natively; a key without one has none.livePostSeeds- the live post bound of each key that has one.legacyCompatible- whether every key of the batch runs the classic tag history calculation of a legacy compatible engine; such keys carry no directive.
public record NativeQueryContext(Map<AggregatedQueryKey, EngineDirective> directives, Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds, boolean legacyCompatible)
extends Record
Pipeline-supplied context for one aggregated query computed natively by an engine: the directive
for each key, the live post bound of each key that has one, and whether the batch runs the
classic tag history calculation. Passed alongside the caller's options; direct engine callers
pass
NONE.
An engine uses a live post bound wherever its own statement reads the key's sample after the range, and only where it finds no stored sample, of any level, there. The pipeline has already decided each one applies; the engine adds no rule of its own.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NativeQueryContextNo directives and no live post bounds. -
Constructor Summary
ConstructorsConstructorDescriptionNativeQueryContext(Map<AggregatedQueryKey, EngineDirective> directives, Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds) A context for a batch that does not run the classic calculation.NativeQueryContext(Map<AggregatedQueryKey, EngineDirective> directives, Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds, boolean legacyCompatible) Creates an instance of aNativeQueryContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectivesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thelegacyCompatiblerecord component.Returns the value of thelivePostSeedsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NONE
No directives and no live post bounds.
-
-
Constructor Details
-
NativeQueryContext
public NativeQueryContext(Map<AggregatedQueryKey, EngineDirective> directives, Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds, boolean legacyCompatible) Creates an instance of aNativeQueryContextrecord class.- Parameters:
directives- the value for thedirectivesrecord componentlivePostSeeds- the value for thelivePostSeedsrecord componentlegacyCompatible- the value for thelegacyCompatiblerecord component
-
NativeQueryContext
public NativeQueryContext(Map<AggregatedQueryKey, EngineDirective> directives, Map<AggregatedQueryKey, SeedResults.SeedValue<?>> livePostSeeds) A context for a batch that does not run the classic calculation.
-
-
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. -
directives
Returns the value of thedirectivesrecord component.- Returns:
- the value of the
directivesrecord component
-
livePostSeeds
Returns the value of thelivePostSeedsrecord component.- Returns:
- the value of the
livePostSeedsrecord component
-
legacyCompatible
public boolean legacyCompatible()Returns the value of thelegacyCompatiblerecord component.- Returns:
- the value of the
legacyCompatiblerecord component
-