java.lang.Object
org.sentrysoftware.metricshub.engine.connector.model.monitor.task.source.Source
org.sentrysoftware.metricshub.engine.connector.model.monitor.task.source.SqlSource
All Implemented Interfaces:
Serializable

public class SqlSource extends Source
Represents a source that performs a SQL operation.
See Also:
  • Constructor Details

    • SqlSource

      public SqlSource(String type, List<Compute> computes, boolean forceSerialization, String key, ExecuteForEachEntryOf executeForEachEntryOf, @NonNull @NonNull List<SqlTable> tables, @NonNull @NonNull String query)
      Builder for creating instances of SqlSource.
      Parameters:
      type - The type of the source.
      computes - List of computations to be applied to the source.
      forceSerialization - Flag indicating whether to force serialization.
      key - The key associated with the source.
      executeForEachEntryOf - The execution context for each entry of the source.
      tables - The list of tables to be used in the SQL query.
      query - The query to execute.
  • Method Details

    • copy

      public SqlSource copy()
      Description copied from class: Source
      Creates a copy of the source.
      Specified by:
      copy in class Source
      Returns:
      A new Source instance that is a copy of the original.
    • update

      public void update(UnaryOperator<String> updater)
      Description copied from class: Source
      Updates the source based on the provided updater function.
      Specified by:
      update in class Source
      Parameters:
      updater - The updater function to modify the source.
    • toString

      public String toString()
      Overrides:
      toString in class Source
    • accept

      public SourceTable accept(ISourceProcessor sourceProcessor)
      Description copied from class: Source
      Accepts a source processor to perform processing on the source.
      Specified by:
      accept in class Source
      Parameters:
      sourceProcessor - The source processor to accept.
      Returns:
      A SourceTable representing the processed source.