aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-09-15 11:13:08 +0000
committerGravatar John Field <jfield@google.com>2015-09-15 20:27:14 +0000
commit633f539e989de4304123027157e7e3bce338483c (patch)
tree747bb4a96e1e2e065375c247da22e0acca8df2a7 /src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
parent13fb7fd8959c57999b2d705ae041757ba1e90f12 (diff)
Introduce CommandEnvironment and pass it instead of BlazeRuntime.
The very long term plan is to make BlazeRuntime immutable, so that we can run multiple commands in the same server. -- MOS_MIGRATED_REVID=103080946
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
index fe606e6f08..4e63e7ebd1 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
@@ -15,8 +15,8 @@ package com.google.devtools.build.lib.runtime.commands;
import com.google.devtools.build.lib.runtime.BlazeCommand;
import com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.ShutdownBlazeServerException;
-import com.google.devtools.build.lib.runtime.BlazeRuntime;
import com.google.devtools.build.lib.runtime.Command;
+import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.common.options.Option;
import com.google.devtools.common.options.OptionsBase;
@@ -47,12 +47,11 @@ public final class ShutdownCommand implements BlazeCommand {
}
@Override
- public void editOptions(BlazeRuntime runtime, OptionsParser optionsParser) {}
+ public void editOptions(CommandEnvironment env, OptionsParser optionsParser) {}
@Override
- public ExitCode exec(BlazeRuntime runtime, OptionsProvider options)
+ public ExitCode exec(CommandEnvironment env, OptionsProvider options)
throws ShutdownBlazeServerException {
-
int limit = options.getOptions(Options.class).heapSizeLimit;
// Iff limit is non-zero, shut down the server if total memory exceeds the