Package org.sonar.api.batch.fs.internal
Interface OptimizedFilePredicate
-
- All Superinterfaces:
java.lang.Comparable<OptimizedFilePredicate>
,FilePredicate
- All Known Implementing Classes:
AbstractFilePredicate
,FileExtensionPredicate
,FilenamePredicate
,RelativePathPredicate
,StatusPredicate
public interface OptimizedFilePredicate extends FilePredicate, java.lang.Comparable<OptimizedFilePredicate>
Optimized version of FilePredicate allowing to speed up query by looking at InputFile by index.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Iterable<InputFile>
filter(java.lang.Iterable<InputFile> inputFiles)
Filter provided files to keep only the ones that are valid for this predicatejava.lang.Iterable<InputFile>
get(FileSystem.Index index)
Get all files that are valid for this predicate.int
priority()
For optimization.-
Methods inherited from interface org.sonar.api.batch.fs.FilePredicate
apply
-
-
-
-
Method Detail
-
filter
java.lang.Iterable<InputFile> filter(java.lang.Iterable<InputFile> inputFiles)
Filter provided files to keep only the ones that are valid for this predicate
-
get
java.lang.Iterable<InputFile> get(FileSystem.Index index)
Get all files that are valid for this predicate.
-
priority
int priority()
For optimization. FilePredicates will be applied in priority order. For example when doing p.and(p1, p2, p3) then p1, p2 and p3 will be applied according to their priority value. Higher priority value are applied first. Assign a high priority when the predicate will likely highly reduce the set of InputFiles to filter. AlsoRelativePathPredicate
and AbsolutePathPredicate have a high priority since they are using cache index.
-
-