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

public class StaticSource extends Source
Represents a source task with a static value.
See Also:
  • Constructor Details

    • StaticSource

      public StaticSource(String type, List<Compute> computes, boolean forceSerialization, @NonNull @NonNull String value, String key, ExecuteForEachEntryOf executeForEachEntryOf)
      Constructs a new StaticSource instance with the provided attributes.
      Parameters:
      type - the type of the source
      computes - the list of compute operations to be applied
      forceSerialization - flag indicating whether serialization should be forced
      value - the static value associated with the source
      key - the key associated with the source
      executeForEachEntryOf - the execute-for-each-entry-of information
  • Method Details

    • copy

      public StaticSource copy()
      Creates a new instance by copying the current instance.
      Specified by:
      copy in class Source
      Returns:
      a new StaticSource instance
    • 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.