Class NpmCpeMemoryIndex
- java.lang.Object
-
- org.owasp.dependencycheck.data.cpe.AbstractMemoryIndex
-
- org.owasp.dependencycheck.data.cpe.NpmCpeMemoryIndex
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,MemoryIndex
@ThreadSafe public final class NpmCpeMemoryIndex extends AbstractMemoryIndex
An in memory Lucene index that contains the vendor/product combinations from the CPE (application) identifiers within the NVD CVE data. The intent of the index is to hold only products in the NVD associated with NPM/node.js.
This is the last remaining singleton in dependency-check-core; The use of this singleton - while it may not technically be thread-safe (one database used to build this index may not have the same entries as another) the risk of this is currently believed to be small. As this memory index consumes a large amount of memory we will remain using the singleton pattern for now.- Author:
- Jeremy Long
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NpmCpeMemoryIndex
getInstance()
Gets the singleton instance of the CpeMemoryIndex.protected AbstractMemoryIndex
instance()
Gets the singleton instance of the NpmCpeMemoryIndex.-
Methods inherited from class org.owasp.dependencycheck.data.cpe.AbstractMemoryIndex
close, explain, getDocument, isOpen, numDocs, open, parseQuery, resetAnalyzers, search, search
-
-
-
-
Method Detail
-
instance
protected AbstractMemoryIndex instance()
Gets the singleton instance of the NpmCpeMemoryIndex.- Specified by:
instance
in classAbstractMemoryIndex
- Returns:
- the instance of the NpmCpeMemoryIndex
-
getInstance
public static NpmCpeMemoryIndex getInstance()
Gets the singleton instance of the CpeMemoryIndex.- Returns:
- the instance of the CpeMemoryIndex
-
-