@ThreadSafe public class DaemonicParserState extends Object
Parser
. All public
methods that cause build files to be read must be guarded by calls to invalidateIfProjectBuildFileParserStateChanged(Cell)
in order to ensure that state is
maintained correctly.Modifier and Type | Field and Description |
---|---|
static com.facebook.buck.parser.DaemonicParserState.CacheType<UnconfiguredBuildTarget,UnconfiguredTargetNode> |
RAW_TARGET_NODE_CACHE_TYPE |
static com.facebook.buck.parser.DaemonicParserState.CacheType<BuildTarget,TargetNodeMaybeIncompatible> |
TARGET_NODE_CACHE_TYPE |
Constructor and Description |
---|
DaemonicParserState(int parsingThreads) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<Counter> |
getCounters() |
<K,T> com.facebook.buck.parser.PipelineNodeCache.Cache<K,T> |
getOrCreateNodeCache(com.facebook.buck.parser.DaemonicParserState.CacheType<K,T> cacheType)
Retrieve the cache view for caching a particular type.
|
com.facebook.buck.parser.PipelineNodeCache.Cache<AbsPath,PackageFileManifest> |
getPackageFileCache() |
com.facebook.buck.parser.PipelineNodeCache.Cache<AbsPath,BuildFileManifest> |
getRawNodeCache() |
boolean |
invalidateAllCaches() |
void |
invalidateBasedOn(WatchmanOverflowEvent event) |
void |
invalidateBasedOn(WatchmanPathEvent event) |
boolean |
invalidateCellCaches(Cell cell) |
void |
invalidatePath(AbsPath path)
Invalidate everything which depend on path.
|
static boolean |
isPathCreateOrDeleteEvent(WatchmanPathEvent event) |
String |
toString() |
public static final com.facebook.buck.parser.DaemonicParserState.CacheType<BuildTarget,TargetNodeMaybeIncompatible> TARGET_NODE_CACHE_TYPE
public static final com.facebook.buck.parser.DaemonicParserState.CacheType<UnconfiguredBuildTarget,UnconfiguredTargetNode> RAW_TARGET_NODE_CACHE_TYPE
public <K,T> com.facebook.buck.parser.PipelineNodeCache.Cache<K,T> getOrCreateNodeCache(com.facebook.buck.parser.DaemonicParserState.CacheType<K,T> cacheType)
Note that the output type is not constrained to the type of the Class object to allow for types with generics. Care should be taken to ensure that the correct class object is passed in.
public com.facebook.buck.parser.PipelineNodeCache.Cache<AbsPath,BuildFileManifest> getRawNodeCache()
public com.facebook.buck.parser.PipelineNodeCache.Cache<AbsPath,PackageFileManifest> getPackageFileCache()
public void invalidateBasedOn(WatchmanOverflowEvent event)
public void invalidateBasedOn(WatchmanPathEvent event)
public void invalidatePath(AbsPath path)
public static boolean isPathCreateOrDeleteEvent(WatchmanPathEvent event)
public boolean invalidateCellCaches(Cell cell)
public boolean invalidateAllCaches()
public com.google.common.collect.ImmutableList<Counter> getCounters()