public class RemoteRuleContext extends Object
Constructor and Description |
---|
RemoteRuleContext(BuckEventBus eventBus,
BuildRule rule) |
Modifier and Type | Method and 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.
|
public RemoteRuleContext(BuckEventBus eventBus, BuildRule rule)
public boolean isCancelled()
public Throwable getCancelReason()
public void cancel(Throwable reason)
public boolean tryStart()
public void onCancellation(java.util.function.Consumer<Throwable> cancelCallback)
public Scope enterState(RemoteExecutionActionEvent.State state, Optional<Protocol.Digest> actionDigest)