org.sonar.api.batch.fs.internal
Interface OptimizedFilePredicate

All Superinterfaces:
Comparable<OptimizedFilePredicate>, FilePredicate
All Known Implementing Classes:
AbstractFilePredicate, RelativePathPredicate

public interface OptimizedFilePredicate
extends FilePredicate, Comparable<OptimizedFilePredicate>

Optimized version of FilePredicate allowing to speed up query by looking at InputFile by index.


Method Summary
 Iterable<InputFile> filter(Iterable<InputFile> inputFiles)
          Filter provided files to keep only the ones that are valid for this predicate
 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
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

filter

Iterable<InputFile> filter(Iterable<InputFile> inputFiles)
Filter provided files to keep only the ones that are valid for this predicate


get

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. Also RelativePathPredicate and AbsolutePathPredicate have a high priority since they are using cache index.



Copyright © 2009–2015 SonarSource. All rights reserved.