Record Class DefaultProcessingContext<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.query.processor.DefaultProcessingContext<K,T>
- Type Parameters:
K- the query key typeT- the point type of the keys- Record Components:
properties- the property set of each query key; copied on construction
- All Implemented Interfaces:
ProcessingContext<K,T>
public record DefaultProcessingContext<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>(Map<K extends QueryKey<T>, PropertySet> properties)
extends Record
implements ProcessingContext<K,T>
Immutable
ProcessingContext backed by a map from query key to its PropertySet.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classDefaultProcessingContext.AbstractBuilder<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>, B extends DefaultProcessingContext.AbstractBuilder<K,T, B>> Base builder that accumulates property values per query key.static classDefaultProcessingContext.Builder<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>Builder forDefaultProcessingContext. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultProcessingContext(Map<K, PropertySet> properties) Creates an instance of aDefaultProcessingContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>
DefaultProcessingContext.Builder<K, T> builder()Creates a builder.final booleanIndicates whether some other object is "equal to" this one.<V> Optional<V> getContextValue(K queryKey, Property<V> property) Returns the value ofpropertyforqueryKey.final inthashCode()Returns a hash code value for this object.Map<K, PropertySet> Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultProcessingContext
Creates an instance of aDefaultProcessingContextrecord class.- Parameters:
properties- the value for thepropertiesrecord component
-
-
Method Details
-
builder
public static <K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>> DefaultProcessingContext.Builder<K,T> builder()Creates a builder.- Type Parameters:
K- the query key typeT- the point type of the keys- Returns:
- a new builder
-
getContextValue
Returns the value ofpropertyforqueryKey.- Specified by:
getContextValuein interfaceProcessingContext<K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>- Type Parameters:
V- the property value type- Parameters:
queryKey- the query keyproperty- the property to read- Returns:
- the value, or empty if the key has no value for the property
-
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 withObjects::equals(Object,Object). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-