Remove the unused method IdleServerTasks#continueProcessing() .

IdleServerTasks could probably be implemented in a much simpler way, but let's keep this change a simple deletion. One step at a time.

RELNOTES: None.
PiperOrigin-RevId: 191418738
diff --git a/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java b/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java
index 64d4502..01e596a 100644
--- a/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java
+++ b/src/main/java/com/google/devtools/build/lib/server/IdleServerTasks.java
@@ -16,37 +16,24 @@
 
 import com.google.common.base.Preconditions;
 import com.google.devtools.build.lib.profiler.AutoProfiler;
-import com.google.devtools.build.lib.unix.ProcMeminfoParser;
-import com.google.devtools.build.lib.util.LoggingUtil;
-import com.google.devtools.build.lib.vfs.FileStatus;
-import com.google.devtools.build.lib.vfs.Path;
-import com.google.devtools.build.lib.vfs.Symlinks;
-import java.io.IOException;
 import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
 import java.util.logging.Logger;
-import javax.annotation.Nullable;
 
 /**
  * Run cleanup-related tasks during idle periods in the server.
  * idle() and busy() must be called in that order, and only once.
  */
 class IdleServerTasks {
-
-  private final Path workspaceDir;
   private final ScheduledThreadPoolExecutor executor;
   private static final Logger logger = Logger.getLogger(IdleServerTasks.class.getName());
 
-  private static final long FIVE_MIN_MILLIS = 1000 * 60 * 5;
-
   /**
    * Must be called from the main thread.
    */
-  public IdleServerTasks(@Nullable Path workspaceDir) {
+  public IdleServerTasks() {
     this.executor = new ScheduledThreadPoolExecutor(1);
-    this.workspaceDir = workspaceDir;
   }
 
   /**
@@ -97,63 +84,4 @@
       Thread.currentThread().interrupt();
     }
   }
-
-  /**
-   * Return true iff the server should continue processing requests.
-   * Called from the main thread, so it should return quickly.
-   */
-  public boolean continueProcessing(long idleMillis) {
-    if (!memoryHeuristic(idleMillis)) {
-      return false;
-    }
-    if (workspaceDir == null) {
-      return false;
-    }
-
-    FileStatus stat;
-    try {
-      stat = workspaceDir.statIfFound(Symlinks.FOLLOW);
-    } catch (IOException e) {
-      // Do not terminate the server if the workspace is temporarily inaccessible, for example,
-      // if it is on a network filesystem and the connection is down.
-      return true;
-    }
-    return stat != null && stat.isDirectory();
-  }
-
-  private boolean memoryHeuristic(long idleMillis) {
-    if (idleMillis < FIVE_MIN_MILLIS) {
-      // Don't check memory health until after five minutes.
-      return true;
-    }
-
-    ProcMeminfoParser memInfo = null;
-    try {
-      memInfo = new ProcMeminfoParser();
-    } catch (IOException e) {
-      logger.info("Could not process /proc/meminfo: " + e);
-      return true;
-    }
-
-    long totalPhysical;
-    long totalFree;
-    try {
-      totalPhysical = memInfo.getTotalKb();
-      totalFree = memInfo.getFreeRamKb(); // See method javadoc.
-    } catch (ProcMeminfoParser.KeywordNotFoundException e) {
-      LoggingUtil.logToRemote(Level.WARNING,
-          "Could not read memInfo during idle query", e);
-      return true;
-    }
-    double fractionFree = (double) totalFree / totalPhysical;
-
-    // If the system as a whole is low on memory, let this server die.
-    if (fractionFree < .1) {
-      logger.info("Terminating due to memory constraints");
-      logger.info(String.format("Total physical:%d\nTotal free: %d\n", totalPhysical, totalFree));
-      return false;
-    }
-
-    return true;
-  }
 }