Class AbstractAnalysisCache

    • Field Detail

      • LOG

        protected static final java.util.logging.Logger LOG
      • pmdVersion

        protected final java.lang.String pmdVersion
      • fileResultsCache

        protected final java.util.concurrent.ConcurrentMap<java.lang.String,​AnalysisResult> fileResultsCache
      • updatedResultsCache

        protected final java.util.concurrent.ConcurrentMap<java.lang.String,​AnalysisResult> updatedResultsCache
      • rulesetChecksum

        protected long rulesetChecksum
      • auxClassPathChecksum

        protected long auxClassPathChecksum
      • executionClassPathChecksum

        protected long executionClassPathChecksum
    • Constructor Detail

      • AbstractAnalysisCache

        public AbstractAnalysisCache()
        Creates a new empty cache
    • Method Detail

      • isUpToDate

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

        public void analysisFailed​(java.io.File sourceFile)
        Description copied from interface: AnalysisCache
        Notifies the cache that analysis of the given file has failed and should not be cached
        Specified by:
        analysisFailed in interface AnalysisCache
        Parameters:
        sourceFile - The file whose analysis failed
      • checkValidity

        public void checkValidity​(RuleSets ruleSets,
                                  java.lang.ClassLoader auxclassPathClassLoader)
        Description copied from interface: AnalysisCache
        Checks if the cache is valid for the configured rulesets and class loader.
        Specified by:
        checkValidity in interface AnalysisCache
        Parameters:
        ruleSets - The rulesets configured for this analysis.
        auxclassPathClassLoader - The class loader for auxclasspath configured for this analysis.