Interface AnalysisCache

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void analysisFailed​(java.io.File sourceFile)
      Notifies the cache that analysis of the given file has failed and should not be cached
      void checkValidity​(RuleSets ruleSets, java.lang.ClassLoader auxclassPathClassLoader)
      Checks if the cache is valid for the configured rulesets and class loader.
      java.util.List<RuleViolation> getCachedViolations​(java.io.File sourceFile)
      Retrieves cached violations for the given file.
      boolean isUpToDate​(java.io.File sourceFile)
      Check if a given file is up to date in the cache and can be skipped from analysis
      void persist()
      Persist the analysis results on whatever means is used by the cache
    • Method Detail

      • persist

        void persist()
        Persist the analysis results on whatever means is used by the cache
      • isUpToDate

        boolean isUpToDate​(java.io.File sourceFile)
        Check if a given file is up to date in the cache and can be skipped from analysis
        Parameters:
        sourceFile - The file to check in the cache
        Returns:
        True if the cache is a hit, false otherwise
      • getCachedViolations

        java.util.List<RuleViolation> getCachedViolations​(java.io.File sourceFile)
        Retrieves cached violations for the given file. Make sure to call isUpToDate(File) first.
        Parameters:
        sourceFile - The file to check in the cache
        Returns:
        The list of cached violations.
      • analysisFailed

        void analysisFailed​(java.io.File sourceFile)
        Notifies the cache that analysis of the given file has failed and should not be cached
        Parameters:
        sourceFile - The file whose analysis failed
      • checkValidity

        void checkValidity​(RuleSets ruleSets,
                           java.lang.ClassLoader auxclassPathClassLoader)
        Checks if the cache is valid for the configured rulesets and class loader.
        Parameters:
        ruleSets - The rulesets configured for this analysis.
        auxclassPathClassLoader - The class loader for auxclasspath configured for this analysis.