Class RemoteRuleContext
- java.lang.Object
-
- com.facebook.buck.rules.modern.builders.RemoteRuleContext
-
public class RemoteRuleContext extends Object
This holds information about rule states.
-
-
Constructor Summary
Constructors Constructor Description RemoteRuleContext(BuckEventBus eventBus, BuildRule rule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel(Throwable reason)
Call when action has been cancelled.Scope
enterState(RemoteExecutionActionEvent.State state, Optional<Protocol.Digest> actionDigest)
Called when Action state is changed.Throwable
getCancelReason()
Get Throwable which caused action to cancel.boolean
isCancelled()
Whether action has been cancelled.void
onCancellation(java.util.function.Consumer<Throwable> cancelCallback)
Action has been cancelled.boolean
tryStart()
Call Try Start to set the guard.
-
-
-
Constructor Detail
-
RemoteRuleContext
public RemoteRuleContext(BuckEventBus eventBus, BuildRule rule)
-
-
Method Detail
-
isCancelled
public boolean isCancelled()
Whether action has been cancelled.
-
getCancelReason
public Throwable getCancelReason()
Get Throwable which caused action to cancel.
-
cancel
public void cancel(Throwable reason)
Call when action has been cancelled.
-
tryStart
public boolean tryStart()
Call Try Start to set the guard.
-
onCancellation
public void onCancellation(java.util.function.Consumer<Throwable> cancelCallback)
Action has been cancelled.
-
enterState
public Scope enterState(RemoteExecutionActionEvent.State state, Optional<Protocol.Digest> actionDigest)
Called when Action state is changed.
-
-