Suspends this QEMU VM.
762256
def suspend(self):
        

        if self.is_running():
            vm_status = yield from self._get_vm_status()
            if vm_status is None:
                raise QemuError("Suspending a QEMU VM is not supported")
            elif vm_status == "running" or vm_status == "prelaunch":
                yield from self._control_vm("stop")
                self.status = "suspended"
                log.debug("QEMU VM has been suspended")
            else:
                log.info("QEMU VM is not running to be suspended, current status is {}".format(vm_status))
382900
public void suspend() {
		LOG.info("Suspending the SlotManager.");

		// stop the timeout checks for the TaskManagers and the SlotRequests
		if (taskManagerTimeoutCheck != null) {
			taskManagerTimeoutCheck.cancel(false);
			taskManagerTimeoutCheck = null;
		}

		if (slotRequestTimeoutCheck != null) {
			slotRequestTimeoutCheck.cancel(false);
			slotRequestTimeoutCheck = null;
		}

		for (PendingSlotRequest pendingSlotRequest : pendingSlotRequests.values()) {
			cancelPendingSlotRequest(pendingSlotRequest);
		}

		pendingSlotRequests.clear();

		ArrayList<InstanceID> registeredTaskManagers = new ArrayList<>(taskManagerRegistrations.keySet());

		for (InstanceID registeredTaskManager : registeredTaskManagers) {
			unregisterTaskManager(registeredTaskManager);
		}

		resourceManagerId = null;
		resourceActions = null;
		started = false;
	}
1280886
def disable(self):
        """"""
        self.post("disable")
        if self.service.restart_required:
            self.service.restart(120)
        return self
1010433
public void suspendZooKeeper() {
        val zk = this.zkServer.get();
        Preconditions.checkState(zk != null, "ZooKeeper not started.");

        // Stop, but do not close, the ZK runner.
        zk.stop();
        log.info("ZooKeeper suspended.");
    }
645511
public void suspend()
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "suspend");

        if (tc.isEventEnabled()) Tr.event(tc, "suspending (global)");
        _suspendedUOW = _tranManager.suspend();

        if (tc.isEntryEnabled()) Tr.exit(tc, "suspend", _suspendedUOWType);
    }
1280380
def stop(self):
        

        self._hw_virtualization = False
        yield from self._stop_remote_console()
        yield from self._stop_ubridge()

        try:
            if (yield from self.is_running()):
                if self.acpi_shutdown:
                    # use ACPI to shutdown the VM
                    yield from self._control_vm("stop", "soft")
                else:
                    yield from self._control_vm("stop")
        finally:
            self._started = False
            self.status = "stopped"

            self._read_vmx_file()
            self._vmnets.clear()
            # remove the adapters managed by GNS3
            for adapter_number in range(0, self._adapters):
                vnet = "ethernet{}.vnet".format(adapter_number)
                if self._get_vmx_setting(vnet) or self._get_vmx_setting("ethernet{}.connectiontype".format(adapter_number)) is None:
                    if vnet in self._vmx_pairs:
                        vmnet = os.path.basename(self._vmx_pairs[vnet])
                        if not self.manager.is_managed_vmnet(vmnet):
                            continue
                    log.debug("removing adapter {}".format(adapter_number))
                    self._vmx_pairs[vnet] = "vmnet1"
                    self._vmx_pairs["ethernet{}.connectiontype".format(adapter_number)] = "custom"

            # re-enable any remaining network adapters
            for adapter_number in range(self._adapters, self._maximum_adapters):
                if self._get_vmx_setting("ethernet{}.present".format(adapter_number), "TRUE"):
                    log.debug("enabling remaining adapter {}".format(adapter_number))
                    self._vmx_pairs["ethernet{}.startconnected".format(adapter_number)] = "TRUE"
            self._write_vmx_file()

        yield from super().stop()
        log.info("VMware VM '{name}' [{id}] stopped".format(name=self.name, id=self.id))
11914
def stop(name, call=None):
    '''
    
    '''
    conn = get_conn()
    node = get_node(conn, name)  # pylint: disable=not-callable
    log.debug('Node of Cloud VM: %s', node)

    status = conn.ex_shutdown_graceful(node)
    log.debug('Status of Cloud VM: %s', status)

    return status
213259
def serve(self):
        """"""
        while self.ready:
            try:
                self.tick()
            except (KeyboardInterrupt, SystemExit):
                raise
            except Exception:
                self.error_log(
                    'Error in HTTPServer.tick', level=logging.ERROR,
                    traceback=True,
                )

            if self.interrupt:
                while self.interrupt is True:
                    # Wait for self.stop() to complete. See _set_interrupt.
                    time.sleep(0.1)
                if self.interrupt:
                    raise self.interrupt
702955
def suspend(rq, ctx, duration):
    ""
    ctx.invoke(
        rq_cli.suspend,
        duration=duration,
        **shared_options(rq)
    )
1089258
def stop(self):
        """"""

        for tile in self._tiles.values():
            tile.signal_stop()

        for tile in self._tiles.values():
            tile.wait_stopped()

        super(TileBasedVirtualDevice, self).stop()
883369
public static <R> R suspendWhenNull(long intervalAsMillis,
            Supplier<R> objectSupplier) {
        R object = objectSupplier.get();
        if (object == null) {
            log.warn("Start Suspending !!!");
            long startTimeMillis = System.currentTimeMillis();
            while ((object = objectSupplier.get()) == null)
                sleep(intervalAsMillis);
            log.warn("Stop Suspending Over {} ms",
                    System.currentTimeMillis() - startTimeMillis);
        }
        return object;
    }
5329
def stop(name, vmid=None, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The stop action must be called with -a or --action.'
        )

    if not set_vm_status('stop', name, vmid=vmid):
        log.error('Unable to bring VM %s (%s) down..', name, vmid)
        raise SaltCloudExecutionFailure

    # xxx: TBD: Check here whether the status was actually changed to 'stopped'

    return {'Stopped': '{0} was stopped.'.format(name)}
199673
public void suspend(final byte[] message) {
    synchronized (this.heartBeatManager) {
      if (this.currentStatus.isNotRunning()) {
        LOG.log(Level.WARNING, "Trying to suspend a task that is in state: {0}. Ignoring.",
            this.currentStatus.getState());
      } else {
        try {
          this.suspendTask(message);
          this.currentStatus.setSuspendRequested();
        } catch (final TaskSuspendHandlerFailure taskSuspendHandlerFailure) {
          LOG.log(Level.WARNING, "Exception while executing task suspend handler.",
              taskSuspendHandlerFailure.getCause());
          this.currentStatus.setException(taskSuspendHandlerFailure.getCause());
        }
      }
    }
  }
935719
public void suspend() {
    if (suspension.compareAndSet(null, new CountDownLatch(1))) {
      try {
        suspendBarrier.await();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
      } catch (BrokenBarrierException e) {
        LOG.error("Exception during suspend: " + flowletContext, e);
      }
    }
  }
1216064
public void stop() {
    Preconditions.checkState(mJvmMonitorThread != null,
        "JVM monitor thread does not start");
    mJvmMonitorThread.interrupt();
    try {
      mJvmMonitorThread.join();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
    reset();
  }
997812
protected void suspendRepository() throws RepositoryException
   {
      SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);

      repository.setState(ManageableRepository.SUSPENDED);
   }
952717
def pause(self):
        """"""
        self._mq.send("p", True, type=1)
        self._paused = True