Package com.facebook.buck.rules.keys
Class EventPostingRuleKeyCacheScope<V>
- java.lang.Object
-
- com.facebook.buck.rules.keys.EventPostingRuleKeyCacheScope<V>
-
- All Implemented Interfaces:
RuleKeyCacheScope<V>
,AutoCloseable
public class EventPostingRuleKeyCacheScope<V> extends Object implements RuleKeyCacheScope<V>
ARuleKeyCacheScope
which logs stats on close.
-
-
Constructor Summary
Constructors Constructor Description EventPostingRuleKeyCacheScope(BuckEventBus buckEventBus, TrackedRuleKeyCache<V> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanup(SimplePerfEvent.Scope scope)
Additional cleanup.void
close()
TrackedRuleKeyCache<V>
getCache()
protected void
setup(SimplePerfEvent.Scope scope)
Additional setup.
-
-
-
Constructor Detail
-
EventPostingRuleKeyCacheScope
public EventPostingRuleKeyCacheScope(BuckEventBus buckEventBus, TrackedRuleKeyCache<V> cache)
-
-
Method Detail
-
setup
protected void setup(SimplePerfEvent.Scope scope)
Additional setup. To be implemented by sub-classes.
-
cleanup
protected void cleanup(SimplePerfEvent.Scope scope)
Additional cleanup. To be implemented by sub-classes.
-
getCache
public final TrackedRuleKeyCache<V> getCache()
- Specified by:
getCache
in interfaceRuleKeyCacheScope<V>
- Returns:
- the scoped
RuleKeyCache
.
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRuleKeyCacheScope<V>
-
-