Stop catching InterruptedException in remote execution.
If the user interrupts the build, they probably don't want local
fallback to happen.
Also clean up an unused method and parameter.
--
Change-Id: I6bf80fa110bbba911b0743f24c25240c208c98d1
Reviewed-on: https://bazel-review.googlesource.com/5470
MOS_MIGRATED_REVID=130612791
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionCache.java
index 538a4c9..e865c96 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionCache.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionCache.java
@@ -18,7 +18,6 @@
import com.google.devtools.build.lib.actions.ActionInputFileCache;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadCompatible;
import com.google.devtools.build.lib.vfs.Path;
-
import java.io.IOException;
import java.util.Collection;
@@ -28,19 +27,12 @@
@ThreadCompatible
interface RemoteActionCache {
/**
- * Put the file in cache if it is not already in it. No-op if the file is already stored in
- * cache.
+ * Put the file in cache if it is not already in it. No-op if the file is already stored in cache.
*
* @return The key for fetching the file from cache.
*/
- String putFileIfNotExist(Path file) throws IOException;
-
- /**
- * Same as {@link putFileIfNotExist(Path)} but this methods takes an ActionInput.
- *
- * @return The key for fetching the file from cache.
- */
- String putFileIfNotExist(ActionInputFileCache cache, ActionInput file) throws IOException;
+ String putFileIfNotExist(ActionInputFileCache cache, ActionInput file)
+ throws IOException, InterruptedException;
/**
* Write the file in cache identified by key to the file system. The key must uniquely identify
@@ -58,14 +50,11 @@
void writeActionOutput(String key, Path execRoot)
throws IOException, CacheNotFoundException;
- /**
- * Update the cache with the action outputs for the specified key.
- */
+ /** Update the cache with the action outputs for the specified key. */
void putActionOutput(String key, Collection<? extends ActionInput> outputs)
- throws IOException;
+ throws IOException, InterruptedException;
- /**
- * Update the cache with the files for the specified key.
- */
- void putActionOutput(String key, Path execRoot, Collection<Path> files) throws IOException;
+ /** Update the cache with the files for the specified key. */
+ void putActionOutput(String key, Path execRoot, Collection<Path> files)
+ throws IOException, InterruptedException;
}