aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/Action.java
diff options
context:
space:
mode:
authorGravatar ruperts <ruperts@google.com>2017-10-18 00:58:29 +0200
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-10-18 10:28:27 +0200
commit841880dc66bfd0702a08105835a445cb3dc271c9 (patch)
tree758c9178d16f161ed19313a7f0d082c19a4a6db5 /src/main/java/com/google/devtools/build/lib/actions/Action.java
parent34a9fea78f201caed8ace5c714a0cf288cb97c65 (diff)
Actions now have the option of returning an ActionResult, containing a (possibly empty) set of SpawnResults created during execution of the Action.
RELNOTES: None. PiperOrigin-RevId: 172529328
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/Action.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Action.java35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Action.java b/src/main/java/com/google/devtools/build/lib/actions/Action.java
index 9faddfea0c..e87d79edcf 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Action.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Action.java
@@ -89,32 +89,31 @@ public interface Action extends ActionExecutionMetadata, Describable {
void prepare(Path execRoot) throws IOException;
/**
- * Executes this action; called by the Builder when all of this Action's
- * inputs have been successfully created. (Behaviour is undefined if the
- * prerequisites are not up to date.) This method <i>actually does the work
- * of the Action, unconditionally</i>; in other words, it is invoked by the
- * Builder only when dependency analysis has deemed it necessary.</p>
+ * Executes this action; called by the Builder when all of this Action's inputs have been
+ * successfully created. (Behaviour is undefined if the prerequisites are not up to date.) This
+ * method <i>actually does the work of the Action, unconditionally</i>; in other words, it is
+ * invoked by the Builder only when dependency analysis has deemed it necessary.
*
- * <p>The framework guarantees that the output directory for each file in
- * <code>getOutputs()</code> has already been created, and will check to
- * ensure that each of those files is indeed created.</p>
+ * <p>The framework guarantees that the output directory for each file in <code>getOutputs()
+ * </code> has already been created, and will check to ensure that each of those files is indeed
+ * created.
*
- * <p>Implementations of this method should try to honour the {@link
- * java.lang.Thread#interrupted} contract: if an interrupt is delivered to
- * the thread in which execution occurs, the action should detect this on a
- * best-effort basis and terminate as quickly as possible by throwing an
+ * <p>Implementations of this method should try to honour the {@link java.lang.Thread#interrupted}
+ * contract: if an interrupt is delivered to the thread in which execution occurs, the action
+ * should detect this on a best-effort basis and terminate as quickly as possible by throwing an
* ActionExecutionException.
*
- * <p>Action execution must be ThreadCompatible in order to be safely used
- * with a concurrent Builder implementation such as ParallelBuilder.
+ * <p>Action execution must be ThreadCompatible in order to be safely used with a concurrent
+ * Builder implementation such as ParallelBuilder.
*
- * @param actionExecutionContext Services in the scope of the action, like the output and error
- * streams to use for messages arising during action execution.
- * @throws ActionExecutionException if execution fails for any reason.
+ * @param actionExecutionContext services in the scope of the action, like the output and error
+ * streams to use for messages arising during action execution
+ * @return returns an ActionResult containing action execution metadata
+ * @throws ActionExecutionException if execution fails for any reason
* @throws InterruptedException
*/
@ConditionallyThreadCompatible
- void execute(ActionExecutionContext actionExecutionContext)
+ ActionResult execute(ActionExecutionContext actionExecutionContext)
throws ActionExecutionException, InterruptedException;
/**