Renaming ExecutorShutdownUtil to ExecutorUtil, since it doesn't just do shutdown operations.

--
MOS_MIGRATED_REVID=96351438
diff --git a/src/main/java/com/google/devtools/build/lib/concurrent/ExecutorShutdownUtil.java b/src/main/java/com/google/devtools/build/lib/concurrent/ExecutorUtil.java
similarity index 94%
rename from src/main/java/com/google/devtools/build/lib/concurrent/ExecutorShutdownUtil.java
rename to src/main/java/com/google/devtools/build/lib/concurrent/ExecutorUtil.java
index 95962b3..0120334 100644
--- a/src/main/java/com/google/devtools/build/lib/concurrent/ExecutorShutdownUtil.java
+++ b/src/main/java/com/google/devtools/build/lib/concurrent/ExecutorUtil.java
@@ -23,12 +23,11 @@
 import java.util.concurrent.TimeUnit;
 
 /**
- * Utilities for safely shutting down executors.
- * TODO(bazel-team): Rename this class to something like "ExecutorUtil".
+ * Useful utilities for executors.
  */
-public class ExecutorShutdownUtil {
+public class ExecutorUtil {
 
-  private ExecutorShutdownUtil() {
+  private ExecutorUtil() {
   }
 
   /**
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FilesystemValueChecker.java b/src/main/java/com/google/devtools/build/lib/skyframe/FilesystemValueChecker.java
index 2ab7547..923cc30 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/FilesystemValueChecker.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/FilesystemValueChecker.java
@@ -25,7 +25,7 @@
 import com.google.common.collect.Sets;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.google.devtools.build.lib.actions.Artifact;
-import com.google.devtools.build.lib.concurrent.ExecutorShutdownUtil;
+import com.google.devtools.build.lib.concurrent.ExecutorUtil;
 import com.google.devtools.build.lib.concurrent.Sharder;
 import com.google.devtools.build.lib.concurrent.ThrowableRecordingRunnableWrapper;
 import com.google.devtools.build.lib.util.LoggingUtil;
@@ -162,7 +162,7 @@
       executor.submit(wrapper.wrap(job));
     }
 
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executor);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executor);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     LOG.info("Completed output file stat checks");
     if (interrupted) {
@@ -318,7 +318,7 @@
       }));
     }
 
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executor);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executor);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted) {
       throw new InterruptedException();
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
index 69264eb..e23b4fc 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java
@@ -53,7 +53,7 @@
 import com.google.devtools.build.lib.actions.ResourceSet;
 import com.google.devtools.build.lib.actions.TargetOutOfDateException;
 import com.google.devtools.build.lib.actions.cache.MetadataHandler;
-import com.google.devtools.build.lib.concurrent.ExecutorShutdownUtil;
+import com.google.devtools.build.lib.concurrent.ExecutorUtil;
 import com.google.devtools.build.lib.concurrent.Sharder;
 import com.google.devtools.build.lib.concurrent.ThrowableRecordingRunnableWrapper;
 import com.google.devtools.build.lib.events.Event;
@@ -289,7 +289,7 @@
       executor.execute(
           wrapper.wrap(actionRegistration(shard, actionGraph, artifactPathMap, badActionMap)));
     }
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executor);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executor);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted) {
       throw new InterruptedException();
diff --git a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
index 6749a1e..4e0a433 100644
--- a/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
+++ b/src/main/java/com/google/devtools/build/skyframe/ParallelEvaluator.java
@@ -29,7 +29,7 @@
 import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
 import com.google.devtools.build.lib.collect.nestedset.NestedSetVisitor;
 import com.google.devtools.build.lib.concurrent.AbstractQueueVisitor;
-import com.google.devtools.build.lib.concurrent.ExecutorShutdownUtil;
+import com.google.devtools.build.lib.concurrent.ExecutorUtil;
 import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadCompatible;
 import com.google.devtools.build.lib.concurrent.ThrowableRecordingRunnableWrapper;
 import com.google.devtools.build.lib.events.Event;
@@ -1063,7 +1063,7 @@
     //
     // TODO(bazel-team): Come up with a better design for graph cleaning such that we can respond
     // to interrupts in constant time.
-    boolean newlyInterrupted = ExecutorShutdownUtil.uninterruptibleShutdown(executor);
+    boolean newlyInterrupted = ExecutorUtil.uninterruptibleShutdown(executor);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (newlyInterrupted || alreadyInterrupted) {
       throw new InterruptedException();
diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/BatchedKeyedLockerTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/BatchedKeyedLockerTest.java
index 2e5f8a8..e2449d9 100644
--- a/src/test/java/com/google/devtools/build/lib/concurrent/BatchedKeyedLockerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/concurrent/BatchedKeyedLockerTest.java
@@ -148,7 +148,7 @@
         }
       }));
     }
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executorService);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executorService);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted) {
       Thread.currentThread().interrupt();
diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/KeyedFrequencyStoreTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/KeyedFrequencyStoreTest.java
index 47a34e9..95896e0 100644
--- a/src/test/java/com/google/devtools/build/lib/concurrent/KeyedFrequencyStoreTest.java
+++ b/src/test/java/com/google/devtools/build/lib/concurrent/KeyedFrequencyStoreTest.java
@@ -93,7 +93,7 @@
     for (int i = 0; i < NUM_EXECUTOR_THREADS; i++) {
       executorService.submit(wrapper.wrap(runnable));
     }
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executorService);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executorService);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted) {
       Thread.currentThread().interrupt();
diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java
index 9ee806a..1549a54 100644
--- a/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/concurrent/KeyedLockerTest.java
@@ -165,7 +165,7 @@
     for (int i = 0; i < NUM_EXECUTOR_THREADS; i++) {
       executorService.submit(wrapper.wrap(runnable));
     }
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executorService);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executorService);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted) {
       Thread.currentThread().interrupt();
@@ -210,7 +210,7 @@
     };
     executorService.submit(wrapper.wrap(runnable1));
     executorService.submit(wrapper.wrap(runnable2));
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executorService);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executorService);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted || runnableInterrupted.get()) {
       Thread.currentThread().interrupt();
@@ -264,7 +264,7 @@
     for (int i = 0; i < NUM_EXECUTOR_THREADS; i++) {
       executorService.submit(wrapper.wrap(runnable));
     }
-    boolean interrupted = ExecutorShutdownUtil.interruptibleShutdown(executorService);
+    boolean interrupted = ExecutorUtil.interruptibleShutdown(executorService);
     Throwables.propagateIfPossible(wrapper.getFirstThrownError());
     if (interrupted || runnableInterrupted.get()) {
       Thread.currentThread().interrupt();