Type Parameters:
T - a subclass of PersistentData
All Superinterfaces:
DataConsumer<T>
All Known Subinterfaces:
DataStore<T>
All Known Implementing Classes:
AbstractDatasourceSink, AbstractSink, DatasourceQuerySink, HistoricalRecordSink, TagHistoryDataSinkBridge

public interface DataSink<T extends PersistentData> extends DataConsumer<T>
This interface represents a data sink that can consume and process data of a particular type.
  • 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 associated EngineManifest.

      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 true if engineId.equals(sinkId) (the StorageKey.repeated(String) pattern), which is appropriate for most datasource-bound sinks. Override this method to return false for sinks that have independent identities even when their sinkId happens to match the engineId.

      Returns:
      true if this sink is bound to the engine's lifecycle, false if it has an independent identity
      Since:
      8.3.4
    • 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 PersistentFlavor object 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 BatchWriter object for writing to the data sink