org.apache.flume.source.taildir

## Class TaildirMatcher

- java.lang.Object
- - org.apache.flume.source.taildir.TaildirMatcher

-     @InterfaceAudience.Private
      @InterfaceStability.Evolving
      public class TaildirMatcher
      extends Object

  Identifies and caches the files matched by single file pattern for `TAILDIR` source.

  Since file patterns only apply to the fileNames and not the parent dictionaries, this implementation checks the parent directory for modification (additional or removed files update modification time of parent dir) If no modification happened to the parent dir that means the underlying files could only be written to but no need to rerun the pattern matching on fileNames.

  This implementation provides lazy caching or no caching. Instances of this class keep the result file list from the last successful execution of getMatchingFiles() function invocation, and may serve the content without hitting the FileSystem for performance optimization.

  IMPORTANT: It is assumed that the hosting system provides at least second granularity for both `System.currentTimeMillis()` and `File.lastModified()`. Also that system clock is used for file system timestamps. If it is not the case then configure it as uncached. Class is solely for package only usage. Member functions are not thread safe.
  See Also:
    `TaildirSource`, `ReliableTaildirEventReader`, `TaildirSourceConfigurationConstants`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `getFileGroup()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getFileGroup

          public String getFileGroup()

Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.