/*
(non-Javadoc)

@see com.ibm.ws.kernel.launch.service.PauseableComponent#pause()
771922
@Override
    public void pause() throws PauseableComponentException {
        try {
            if (ivState == ACTIVE_STATE) {
                deactivateEndpoint();
            } else if (ivState == INACTIVE_STATE) {
                Tr.info(tc, "MDB_ENDPOINT_ALREADY_INACTIVE_CNTR4117I", beanMetaData.enterpriseBeanName, beanMetaData.getModuleMetaData().getName(),
                        beanMetaData.getModuleMetaData().getApplicationMetaData().getName());
            } else {
                throw new PauseableComponentException(Tr.formatMessage(tc, "MDB_ENDPOINT_DID_NOT_PAUSE_CNTR4119W", beanMetaData.enterpriseBeanName,
                                                                       beanMetaData.getModuleMetaData().getName(),
                                                                       beanMetaData.getModuleMetaData().getApplicationMetaData().getName()));
            }
        } catch (ResourceException re) {
            throw new PauseableComponentException(re);
        }

    }
710919
@Override
   public final void stop() {
      // Trying to stop() from FAILED is valid, but may not work
      boolean failed;

      synchronized (this) {
         try {
            while (state == ComponentStatus.STOPPING) {
               wait();
            }
            if (!state.stopAllowed()) {
               getLog().debugf("Ignoring call to stop() as current state is %s", state);
               return;
            }

            failed = state == ComponentStatus.FAILED;
            state = ComponentStatus.STOPPING;
         } catch (InterruptedException e) {
            throw new CacheException("Interrupted waiting for the component registry to stop");
         }
      }

      preStop();

      try {
         internalStop();

         postStop();
      } catch (Throwable t) {
         if (failed) {
            getLog().failedToCallStopAfterFailure(t);
         } else {
            handleLifecycleTransitionFailure(t);
         }
      } finally {
         synchronized (this) {
            state = ComponentStatus.TERMINATED;
         }
      }
   }
1146710
public void pauseUpload() throws LocalOperationException {
        if (state == State.UPLOADING) {
            setState(State.PAUSED);
            executor.hardStop();
        } else {
            throw new LocalOperationException("Attempt to pause upload while assembly is not uploading");
        }
    }
583466
async def pause(self):
        """"""

        self.logger.debug("pause command")

        if not self.state == 'ready':
            return

        if self.streamer is None:
            return

        try:
            if self.streamer.is_playing():
                self.streamer.pause()
                self.pause_time = self.vclient.loop.time()
                self.statuslog.info("Paused")
        except Exception as e:
            logger.error(e)
            pass
1229989
public function pauseProcessing()
	{
		$this->logger->log(Psr\Log\LogLevel::NOTICE, 'USR2 received; pausing job processing');
		$this->paused = true;
	}
28918
public static function pause()
    {
        if (!self::$output) {
            return;
        }

        self::$output->writeln("<info>The execution has been paused. Press ENTER to continue</info>");

        if (trim(fgets(STDIN)) != chr(13)) {
            return;
        }
    }
958443
public synchronized void stop() {
        if (state != State.STOPPED) {
            nanoTimeStop = System.nanoTime();
            state = State.STOPPED;
        }
    }
778650
@Handler(priority = -10000)
    public void onStop(Stop event) throws InterruptedException {
        synchronized (this) {
            if (runner == null) {
                return;
            }
            runner.interrupt();
            synchronized (this) {
                if (registered) {
                    unregisterAsGenerator();
                    registered = false;
                }
            }
            runner = null;
        }
    }
66131
protected void checkPauseAndWait() {
		pauseLock.lock();
		try {
			while (paused && ! stopped) {
				pausedCondition.await();
			}
		} catch (InterruptedException e) {
		} finally {
			pauseLock.unlock();
		}
	}
40266
public void pauseTrigger (final TriggerKey triggerKey) throws SchedulerException
  {
    validateState ();

    m_aResources.getJobStore ().pauseTrigger (triggerKey);
    notifySchedulerThread (0L);
    notifySchedulerListenersPausedTrigger (triggerKey);
  }
747227
public synchronized void pause() {
        if (paused) {
            Util.w(TAG, "require pause this queue(remain " + taskList.size() + "), but"
                    + "it has already been paused");
            return;
        }
        paused = true;

        if (runningTask != null) {
            runningTask.cancel();
            taskList.add(0, runningTask);
            runningTask = null;
        }
    }
570686
public void pause(String queueName) {
        try {
            getQueueControl(queueName).pause();
        } catch (Exception e) {
            throw new AsyncException(e);
        }
    }
1032925
public void pause ()
    {
        if (_state != AL10.AL_PLAYING) {
            log.warning("Tried to pause stream that wasn't playing.");
            return;
        }
        _source.pause();
        _state = AL10.AL_PAUSED;
    }
530502
private void doPause(long id) {
    log.debug(String.format("%s - Paused connection to %s", this, context.target()));
    paused = true;
  }
1321454
def pause(self):
        
        if self.state_machine_manager.active_state_machine_id is None:
            logger.info("'Pause' is not a valid action to initiate state machine execution.")
            return
        if self.state_machine_manager.get_active_state_machine() is not None:
            self.state_machine_manager.get_active_state_machine().root_state.recursively_pause_states()

        logger.debug("Pause execution ...")
        self.set_execution_mode(StateMachineExecutionStatus.PAUSED)
737582
@Override
    public void stop(){
        if(isStarted){
            synchronized (this) {
                if (isStarted) {
                    if (getLookupService() instanceof Closable) {
                        ((Closable) getLookupService()).stop();
                    }
                    isStarted = false;
                }
            }
        }
    }
513979
public synchronized void pauseControlPoint(final String controlPoint, ServerActivityCallback listener) {
        final List<ControlPoint> eps = new ArrayList<ControlPoint>();
        for (ControlPoint ep : entryPoints.values()) {
            if (ep.getEntryPoint().equals(controlPoint)) {
                if(!ep.isPaused()) {
                    eps.add(ep);
                }
            }
        }
        if(eps.isEmpty()) {
            if(listener != null) {
                listener.done();
            }
        }
        CountingRequestCountCallback realListener = new CountingRequestCountCallback(eps.size(), listener);
        for (ControlPoint ep : eps) {
            ep.pause(realListener);
        }
    }