Class LocalFallbackStrategy
- java.lang.Object
-
- com.facebook.buck.rules.modern.builders.LocalFallbackStrategy
-
- All Implemented Interfaces:
BuildRuleStrategy
,Closeable
,AutoCloseable
public class LocalFallbackStrategy extends Object implements BuildRuleStrategy
Strategy that makes sure failed remote builds fallback to be executed locally.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocalFallbackStrategy.RemoteActionCancelledException
Thrown when execution needs to be halted because of cancellationstatic class
LocalFallbackStrategy.RemoteActionFailedException
Thrown when execution failed remotely and cannot be retried locally-
Nested classes/interfaces inherited from interface com.facebook.buck.core.rules.build.strategy.BuildRuleStrategy
BuildRuleStrategy.StrategyBuildResult
-
-
Constructor Summary
Constructors Constructor Description LocalFallbackStrategy(BuildRuleStrategy mainBuildRuleStrategy, BuckEventBus eventBus, boolean localFallbackEnabled, boolean localFallbackDisabledOnCorruptedArtifacts, boolean localFallbackEnabledForCompletedAction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Constructor Detail
-
LocalFallbackStrategy
public LocalFallbackStrategy(BuildRuleStrategy mainBuildRuleStrategy, BuckEventBus eventBus, boolean localFallbackEnabled, boolean localFallbackDisabledOnCorruptedArtifacts, boolean localFallbackEnabledForCompletedAction)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBuildRuleStrategy
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
build
public BuildRuleStrategy.StrategyBuildResult build(BuildRule rule, BuildStrategyContext strategyContext)
Description copied from interface:BuildRuleStrategy
Builds the rule.- Specified by:
build
in interfaceBuildRuleStrategy
-
canBuild
public boolean canBuild(BuildRule instance)
Description copied from interface:BuildRuleStrategy
A rule will be built by the custom strategy only if canBuild() returns true.- Specified by:
canBuild
in interfaceBuildRuleStrategy
-
-