@InterfaceAudience.Private @InterfaceStability.Evolving public class TaildirMatcher extends Object
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.Copyright © 2009–2019 Apache Software Foundation. All rights reserved.