Record Class ErroredDataCollector
java.lang.Object
java.lang.Record
com.inductiveautomation.historian.gateway.api.storage.realtime.ErroredDataCollector
- All Implemented Interfaces:
DataCollector
public record ErroredDataCollector(CollectorId identifier, QualityCode code)
extends Record
implements DataCollector
-
Constructor Summary
ConstructorsConstructorDescriptionErroredDataCollector
(CollectorId identifier, QualityCode code) Creates an instance of aErroredDataCollector
record class. -
Method Summary
Modifier and TypeMethodDescriptioncode()
Returns the value of thecode
record component.createNodeSession
(QualifiedPath source, DataType dataType, PropertySet configuration) Creates a new session for interacting with a data node.final boolean
Indicates whether some other object is "equal to" this one.executeDataCollection
(CollectionContext context) Executes the data collection process using the provided context.final int
hashCode()
Returns a hash code value for this object.Returns the value of theidentifier
record component.shutdown()
Initiates an orderly shutdown of thisDataCollector
.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ErroredDataCollector
Creates an instance of aErroredDataCollector
record class.- Parameters:
identifier
- the value for theidentifier
record componentcode
- the value for thecode
record component
-
-
Method Details
-
createNodeSession
public DataNodeSession createNodeSession(QualifiedPath source, DataType dataType, PropertySet configuration) Description copied from interface:DataCollector
Creates a new session for interacting with a data node. This session allows processing various operations like data changes, metadata updates, and source changes for the specified node. It provides a dedicated context for managing the lifecycle and state of a data node.- Specified by:
createNodeSession
in interfaceDataCollector
- Parameters:
source
- TheQualifiedPath
representing the source of the data node.dataType
- TheDataType
specifying the type of data handled by the session.configuration
- APropertySet
containing the configuration properties for the session.- Returns:
- A
DataNodeSession
instance for managing operations and observing state changes for the specified data node.
-
executeDataCollection
Description copied from interface:DataCollector
Executes the data collection process using the provided context. This operation initiates data retrieval or aggregation based on the configuration and parameters specified in theCollectionContext
instance. The process could include handling periodic or one-time data collections, as well as processing heartbeat operations if indicated in the context.- Specified by:
executeDataCollection
in interfaceDataCollector
- Parameters:
context
- TheCollectionContext
object encapsulating all necessary details for the data collection operation, such as identifiers, source, interval, timestamp, and value origin.- Returns:
- A
CompletionStage
that completes when the data collection process is finished. If any errors occur during the operation, theCompletionStage
will complete exceptionally.
-
shutdown
Description copied from interface:DataCollector
Initiates an orderly shutdown of thisDataCollector
. This operation will:- Stop accepting new data points or node sessions
- Process and flush any remaining queued data
- Close all active
DataNodeSession
s - Release any system resources
DataCollector
instance should be considered unusable and any subsequent method calls will result in undefined behavior.- Specified by:
shutdown
in interfaceDataCollector
- Returns:
- A
CompletionStage
that completes normally when shutdown is finished, or completes exceptionally if errors occurred during shutdown
-
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. -
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. -
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)
. -
identifier
Returns the value of theidentifier
record component.- Specified by:
identifier
in interfaceDataCollector
- Returns:
- the value of the
identifier
record component
-
code
Returns the value of thecode
record component.- Returns:
- the value of the
code
record component
-