public class LocalFallbackStrategy extends Object implements BuildRuleStrategy
Modifier and Type | Class and Description |
---|---|
static class |
LocalFallbackStrategy.RemoteActionCancelledException
Thrown when execution needs to be halted because of cancellation
|
static class |
LocalFallbackStrategy.RemoteActionFailedException
Thrown when execution failed remotely and cannot be retried locally
|
BuildRuleStrategy.StrategyBuildResult
Constructor and Description |
---|
LocalFallbackStrategy(BuildRuleStrategy mainBuildRuleStrategy,
BuckEventBus eventBus,
boolean localFallbackEnabled,
boolean localFallbackDisabledOnCorruptedArtifacts,
boolean localFallbackEnabledForCompletedAction) |
Modifier and Type | Method and Description |
---|---|
BuildRuleStrategy.StrategyBuildResult |
build(BuildRule rule,
BuildStrategyContext strategyContext)
Builds the rule.
|
boolean |
canBuild(BuildRule instance)
A rule will be built by the custom strategy only if canBuild() returns true.
|
void |
close() |
public LocalFallbackStrategy(BuildRuleStrategy mainBuildRuleStrategy, BuckEventBus eventBus, boolean localFallbackEnabled, boolean localFallbackDisabledOnCorruptedArtifacts, boolean localFallbackEnabledForCompletedAction)
public void close() throws IOException
close
in interface BuildRuleStrategy
close
in interface Closeable
close
in interface AutoCloseable
IOException
public BuildRuleStrategy.StrategyBuildResult build(BuildRule rule, BuildStrategyContext strategyContext)
BuildRuleStrategy
build
in interface BuildRuleStrategy
public boolean canBuild(BuildRule instance)
BuildRuleStrategy
canBuild
in interface BuildRuleStrategy