public class BuildFileManifestCache extends Object implements GraphEngineCache<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>
BuildFileManifest
for each parsed build fileModifier and Type | Class and Description |
---|---|
static class |
BuildFileManifestCache.Invalidator
Subscribes to watchman event and invalidates internal state of a provided
BuildFileManifestCache |
Modifier and Type | Method and Description |
---|---|
Optional<BuildFileManifest> |
get(BuildPackagePathToBuildFileManifestKey key)
Optionally returns the cached result given the key
|
BuildFileManifestCache.Invalidator |
getInvalidator() |
static BuildFileManifestCache |
of(Path superRootPath,
Path rootPath,
Path buildFileName,
ProjectFilesystemView fileSystemView)
Create a new instance of
BuildFileManifestCache |
void |
put(BuildPackagePathToBuildFileManifestKey key,
BuildFileManifest buildFileManifest)
Offers the given key and value for caching
|
public static BuildFileManifestCache of(Path superRootPath, Path rootPath, Path buildFileName, ProjectFilesystemView fileSystemView)
BuildFileManifestCache
superRootPath
- Absolute path to the cell root folder which contains all other cells. All
files and includes should be descendants of this path.rootPath
- Absolute path to the root folder for which files and subfolders are cached,
this is usually the root path of the cell. It may be the same path as superRootPath
or a subfolder of it.buildFileName
- File name of the build file (for example, BUCK) in a form of a Path
fileSystemView
- ProjectFilesystemView
that is used to physically access files,
used for invalidationspublic Optional<BuildFileManifest> get(BuildPackagePathToBuildFileManifestKey key)
GraphEngineCache
get
in interface GraphEngineCache<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>
key
- The desired keypublic void put(BuildPackagePathToBuildFileManifestKey key, BuildFileManifest buildFileManifest)
GraphEngineCache
put
in interface GraphEngineCache<BuildPackagePathToBuildFileManifestKey,BuildFileManifest>
key
- the key to cachebuildFileManifest
- the value to cachepublic BuildFileManifestCache.Invalidator getInvalidator()