V
- public class TrackedRuleKeyCache<V> extends Object implements RuleKeyCache<V>
Constructor and Description |
---|
TrackedRuleKeyCache(TrackableRuleKeyCache<V> cache,
CacheStatsTracker statsTracker) |
Modifier and Type | Method and Description |
---|---|
V |
get(AddsToRuleKey appendable,
java.util.function.Function<? super AddsToRuleKey,RuleKeyResult<V>> create) |
V |
get(BuildEngineAction action) |
V |
get(BuildEngineAction action,
java.util.function.Function<? super BuildEngineAction,RuleKeyResult<V>> create) |
CacheStats |
getStats() |
void |
invalidateAll()
Invalidate everything in the cache.
|
void |
invalidateAllExceptFilesystems(com.google.common.collect.ImmutableSet<ProjectFilesystem> filesystems)
Invalidate all inputs *not* from the given
ProjectFilesystem s and their transitive
dependents. |
void |
invalidateFilesystem(ProjectFilesystem filesystem)
Invalidate all inputs from a given
ProjectFilesystem and their transitive dependents. |
void |
invalidateInputs(Iterable<com.facebook.buck.rules.keys.RuleKeyInput> inputs)
Invalidate the given inputs and all their transitive dependents.
|
public TrackedRuleKeyCache(TrackableRuleKeyCache<V> cache, CacheStatsTracker statsTracker)
@Nullable public V get(BuildEngineAction action)
get
in interface RuleKeyCache<V>
action
, or null if it is not cached..public V get(BuildEngineAction action, java.util.function.Function<? super BuildEngineAction,RuleKeyResult<V>> create)
get
in interface RuleKeyCache<V>
rule
, either serving it form cache or by
running the given function.public V get(AddsToRuleKey appendable, java.util.function.Function<? super AddsToRuleKey,RuleKeyResult<V>> create)
get
in interface RuleKeyCache<V>
appendable
, either serving it form cache or by
running the given function.public void invalidateInputs(Iterable<com.facebook.buck.rules.keys.RuleKeyInput> inputs)
RuleKeyCache
invalidateInputs
in interface RuleKeyCache<V>
public void invalidateAllExceptFilesystems(com.google.common.collect.ImmutableSet<ProjectFilesystem> filesystems)
ProjectFilesystem
s and their transitive
dependents.invalidateAllExceptFilesystems
in interface RuleKeyCache<V>
public void invalidateFilesystem(ProjectFilesystem filesystem)
ProjectFilesystem
and their transitive dependents.invalidateFilesystem
in interface RuleKeyCache<V>
public void invalidateAll()
invalidateAll
in interface RuleKeyCache<V>
public CacheStats getStats()