Class FileIO.MatchConfiguration

  • All Implemented Interfaces:
    java.io.Serializable, HasDisplayData
    Enclosing class:
    FileIO

    public abstract static class FileIO.MatchConfiguration
    extends java.lang.Object
    implements HasDisplayData, java.io.Serializable
    Describes configuration for matching filepatterns, such as EmptyMatchTreatment and continuous watching for matching files.
    See Also:
    Serialized Form
    • Constructor Detail

      • MatchConfiguration

        public MatchConfiguration()
    • Method Detail

      • getMatchUpdatedFiles

        public abstract boolean getMatchUpdatedFiles()
      • getWatchInterval

        public abstract @Nullable org.joda.time.Duration getWatchInterval()
      • continuously

        public FileIO.MatchConfiguration continuously​(org.joda.time.Duration interval,
                                                      Watch.Growth.TerminationCondition<java.lang.String,​?> condition,
                                                      boolean matchUpdatedFiles)
        Continuously watches for new files at the given interval until the given termination condition is reached, where the input to the condition is the filepattern.

        If matchUpdatedFiles is set, also watches for files with timestamp change, with the watching frequency given by the interval. The pipeline will throw a RuntimeError if timestamp extraction for the matched file has failed, suggesting the timestamp metadata is not available with the IO connector.

      • continuously

        public FileIO.MatchConfiguration continuously​(org.joda.time.Duration interval,
                                                      Watch.Growth.TerminationCondition<java.lang.String,​?> condition)
        Continuously watches for new files at the given interval until the given termination condition is reached, where the input to the condition is the filepattern. To watch also for updated files, please set matchUpdatedFiles as true.
      • populateDisplayData

        public void populateDisplayData​(DisplayData.Builder builder)
        Description copied from interface: HasDisplayData
        Register display data for the given transform or component.

        populateDisplayData(DisplayData.Builder) is invoked by Pipeline runners to collect display data via DisplayData.from(HasDisplayData). Implementations may call super.populateDisplayData(builder) in order to register display data in the current namespace, but should otherwise use subcomponent.populateDisplayData(builder) to use the namespace of the subcomponent.

        Specified by:
        populateDisplayData in interface HasDisplayData
        Parameters:
        builder - The builder to populate with display data.
        See Also:
        HasDisplayData