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.

  • Constructor Details

    • StandardCollectionContext

      public StandardCollectionContext(ImmutablePropertySet properties)
      Creates an instance of a StandardCollectionContext record class.
      Parameters:
      properties - the value for the properties record component
  • Method Details

    • hasProperty

      public boolean hasProperty(Property<?> key)
      Specified by:
      hasProperty in interface CollectionContext
    • getValue

      public <T> Optional<T> getValue(Property<T> property)
      Specified by:
      getValue in interface CollectionContext
    • getProperties

      public PropertySet getProperties()
      Specified by:
      getProperties in interface CollectionContext
    • 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 interface CollectionContext
      Returns:
      true if this is an empty context, false otherwise
    • toString

      @NotNull public @NotNull String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • equals

      public boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • properties

      public ImmutablePropertySet properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component