Record Class StandardCollectionContext
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.storage.realtime.StandardCollectionContext
- All Implemented Interfaces:
CollectionContext
public record StandardCollectionContext(ImmutablePropertySet properties)
extends Record
implements CollectionContext
Standard implementation of the CollectionContext interface that contains
all the information needed for a data collection operation.
This implementation can be used for both streaming and batch collection modes, providing flexibility in how data is collected and processed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.historian.gateway.api.storage.realtime.CollectionContext
CollectionContext.Builder, CollectionContext.StandardProperties
-
Constructor Summary
ConstructorsConstructorDescriptionStandardCollectionContext
(ImmutablePropertySet properties) Creates an instance of aStandardCollectionContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.<T> Optional<T>
final int
hashCode()
Returns a hash code value for this object.boolean
hasProperty
(Property<?> key) boolean
isEmpty()
Checks if this context is empty (has no properties or only default ones).Returns the value of theproperties
record component.@NotNull String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.historian.gateway.api.storage.realtime.CollectionContext
collectionId, collectionInterval, collectionSource, collectionTime, isHeartbeat, valueOrigin
-
Constructor Details
-
StandardCollectionContext
Creates an instance of aStandardCollectionContext
record class.- Parameters:
properties
- the value for theproperties
record component
-
-
Method Details
-
hasProperty
- Specified by:
hasProperty
in interfaceCollectionContext
-
getValue
- Specified by:
getValue
in interfaceCollectionContext
-
getProperties
- Specified by:
getProperties
in interfaceCollectionContext
-
isEmpty
public boolean isEmpty()Description copied from interface:CollectionContext
Checks if this context is empty (has no properties or only default ones).- Specified by:
isEmpty
in interfaceCollectionContext
- Returns:
true
if this is an empty context,false
otherwise
-
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. -
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)
. -
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. -
properties
Returns the value of theproperties
record component.- Returns:
- the value of the
properties
record component
-