Interface DataSink<T extends PersistentData>
- Type Parameters:
T- a subclass ofPersistentData
- All Superinterfaces:
DataConsumer<T>
- All Known Subinterfaces:
DataStore<T>
- All Known Implementing Classes:
AbstractDatasourceSink,AbstractSink,DatasourceQuerySink,HistoricalRecordSink,TagHistoryDataSinkBridge
This interface represents a data sink that can consume and process data of a particular type.
-
Method Summary
Modifier and TypeMethodDescriptiongetInfo()Returns descriptive information about this data sink.Returns the flavor of data that the data sink supports.Gets a writer object for writing to the data sink.booleanDetermines whether the data sink is currently accepting data.default booleanIndicates whether this sink is bound to its engine's lifecycle.default voidshutdown()Shuts down the data sink.default voidstartup()Starts up the data sink.Methods inherited from interface com.inductiveautomation.ignition.gateway.storeforward.DataConsumer
storeData, storeData, validateFlavor
-
Method Details
-
startup
default void startup()Starts up the data sink. -
shutdown
default void shutdown()Shuts down the data sink. -
isEngineBound
default boolean isEngineBound()Indicates whether this sink is bound to its engine's lifecycle.Engine-bound sinks (like
DatasourceQuerySink) are inherently tied to their engine (typically a datasource). When the engine is renamed, both the engineId and sinkId will be updated with an associatedEngineManifest.Independent sinks (like ones created from external providers) have their own identity separate from the engine. When the engine is renamed, only the engineId is updated; the sinkId remains intact.
The default implementation returns
trueifengineId.equals(sinkId)(theStorageKey.repeated(String)pattern), which is appropriate for most datasource-bound sinks. Override this method to returnfalsefor sinks that have independent identities even when their sinkId happens to match the engineId.- Returns:
trueif this sink is bound to the engine's lifecycle,falseif it has an independent identity- Since:
- 8.3.4
-
getInfo
DataSinkInformation getInfo()Returns descriptive information about this data sink.- Returns:
- the descriptive information pertaining to this data sink
-
isAccepting
boolean isAccepting()Determines whether the data sink is currently accepting data.- Returns:
- true if the data sink is accepting data, false otherwise
-
getSupportedFlavor
PersistentFlavor<T> getSupportedFlavor()Returns the flavor of data that the data sink supports.- Returns:
- a
PersistentFlavorobject representing the supported flavor
-
getWriter
BatchWriter<T> getWriter()Gets a writer object for writing to the data sink. This can be used for batching data together when writing.- Returns:
- a
BatchWriterobject for writing to the data sink
-