/** Called by {@link Executor} to kill excessive executors from this computer. */ /*package*/ synchronized void removeExecutor(Executor e) { executors.remove(e); addNewExecutorIfNecessary(); if (!isAlive()) { AbstractCIBase ciBase = Jenkins.getInstance(); ciBase.removeComputer(this); } }
/** Really deletes the slave. */ @CLIMethod(name = "delete-node") public HttpResponse doDoDelete() throws IOException { checkPermission(DELETE); Node node = getNode(); if (node != null) { Jenkins.getInstance().removeNode(node); } else { AbstractCIBase app = Jenkins.getInstance(); app.removeComputer(this); } return new HttpRedirect(".."); }