Interface DataConsumer<T extends PersistentData>
- Type Parameters:
T
- The type of data this consumer accepts. Must extendPersistentData
.
- All Known Implementing Classes:
AbstractDatasourceSink
,AbstractSink
,HistoricalRecordSink
,RemoteHistorianSink
,TagHistoryDataSinkBridge
public interface DataConsumer<T extends PersistentData>
A consumer interface that can store data of type
T
which extends PersistentData
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Stores a list of persistent data.default void
Stores a single instance of persistent data.default QualityCode
validateFlavor
(PersistentFlavor<?> flavor) Validates a givenPersistentFlavor
.
-
Method Details
-
storeData
Stores a single instance of persistent data. The default implementation simply wraps the data into an immutable list and callsstoreData(List)
.- Parameters:
data
- The data to be stored- Throws:
DataStorageException
- if an error occurs while storing data
-
storeData
Stores a list of persistent data.- Parameters:
data
- The data to be stored- Throws:
DataStorageException
- if an error occurs while storing data
-
validateFlavor
Validates a givenPersistentFlavor
. The default implementation always gives an uncertain quality code.- Parameters:
flavor
- The flavor to be validated- Returns:
- A
QualityCode
denoting the evaluated quality of the flavor. By default, returnsQualityCode.Uncertain
.
-