Class ModuleInfoHash.Builder
java.lang.Object
com.netflix.module.ModuleInfoHash.Builder
- Enclosing class:
ModuleInfoHash
Builds immutable detached module hash sets.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutable snapshot of the recorded entries.computeAndPut(ModuleReference reference) Computes and records the hash of a module using the coordinate reported by its descriptor.put(ModuleInfoHash.Coordinate coordinate, ModuleHash hash) Records a hash by coordinate.put(String name, ModuleHash hash) Records a hash by unversioned module name.put(String name, String version, ModuleHash hash) Records a hash by module name and descriptor version.
-
Method Details
-
put
Records a hash by unversioned module name.- Parameters:
name- the module namehash- the content hash- Returns:
- this builder
-
put
Records a hash by module name and descriptor version.- Parameters:
name- the module nameversion- the module versionhash- the content hash- Returns:
- this builder
-
put
Records a hash by coordinate.- Parameters:
coordinate- the module coordinatehash- the content hash- Returns:
- this builder
-
computeAndPut
Computes and records the hash of a module using the coordinate reported by its descriptor.- Parameters:
reference- the resolved module- Returns:
- this builder
- Throws:
IOException- if the module cannot be read
-
build
Creates an immutable snapshot of the recorded entries.- Returns:
- the module hash set
-