Shuts down and clears resources held by this service.

@return {@code true} if the service has been shutdown or {@code false} if it had already been shut down.
422449
public synchronized boolean shutdown() {
        if (channel == null) {
            return false;
        }
        Address address = channel.getAddress();
        LOGGER.debug("{0} shutting down clustering service...", address);
        consumers.clear();

        // Mark this as not accepting any more ...
        isOpen.set(false);
        
        try {
            // Disconnect from the channel and close it ...
            channel.disconnect();
            channel.removeChannelListener(listener);
            channel.setReceiver(null);
            channel.close();
            LOGGER.debug("{0} successfully closed main channel", address);
        } finally {
            channel = null;
        }
        membersInCluster.set(1);
        return true;
    }
861364
public java.util.List<String> getShutdown() {
        if (shutdown == null) {
            shutdown = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return shutdown;
    }
410646
@Override
  public void shutdown() {

    synchronized (nextRunnableLock) {
      isShutdown = true;

      if (workers == null) {
        return;
      }

      // signal each worker thread to shut down
      Iterator<WorkerThread> workerThreads = workers.iterator();
      while (workerThreads.hasNext()) {
        WorkerThread wt = workerThreads.next();
        JobRunShell jobRunShell = wt.getRunnable();
        if (jobRunShell != null) {
          log.info("Waiting for Job to shutdown: {}", wt.getRunnable().getJobName());
        }
        wt.shutdown();

        availWorkers.remove(wt);
      }

      // Active worker threads will shut down after finishing their
      // current job.
      nextRunnableLock.notifyAll();
    }
  }
819384
public void shutdown ()
    {
        if (_downers == null) {
            log.warning("Refusing repeat shutdown() request.");
            return;
        }

        ObserverList<ShutdownComponent> list = _downers.toObserverList();
        _downers = null;
        list.apply(new ObserverList.ObserverOp<ShutdownComponent>() {
            public boolean apply (ShutdownComponent comp) {
                log.debug("Shutting down component", "comp", comp);
                comp.shutdown();
                return true;
            }
        });
    }
784609
public static base_response Shutdown(nitro_service client, shutdown resource) throws Exception {
		shutdown Shutdownresource = new shutdown();
		return Shutdownresource.perform_operation(client);
	}
281106
@Override
  public void shutdown(ShutdownModeAmp mode)
  {
    TreeSet<String> serviceNames = new TreeSet<>(_serviceMap.keySet());
    
    // HashSet<ServiceRefAmp> serviceSet = new HashSet<>(_serviceMap.values());
    
    if (mode == ShutdownModeAmp.GRACEFUL) {
      save(serviceNames);
    }
    
    for (String serviceName : serviceNames) {
      try {
        ServiceRefAmp serviceRef = _serviceMap.get(serviceName);
        
        serviceRef.shutdown(mode);
      } catch (Throwable e) {
        log.log(Level.FINE, e.toString(), e);
      }
    }
  }
434874
private void shutdownServices() {
        if (producerService != null) {
            producerService.shutdown();
            producerService = null; 
        }
        
        if (deserializerService != null) {
            deserializerService.shutdown();
            deserializerService = null;
        }
    }
473000
static synchronized void shutDownHub() {
        LOGGER.entering();
        if (!isRunLocally()) {
            LOGGER.exiting();
            return;
        }

        // shutdown in reverse order
        Collections.reverse(toBoot);
        for (LocalServerComponent eachItem : toBoot) {
            eachItem.shutdown();
        }
        clearToBootList();
        LOGGER.exiting();
    }
576322
@Override
  public void shutdown(ShutdownModeAmp mode)
  {
    // jamp/3210
    //getReadMailbox().close();

    for (int i = _serviceCloseList.size() - 1; i >= 0; i--) {
      ServiceRefAmp service = _serviceCloseList.get(i);

      service.shutdown(mode);
    }
  }
1241265
private boolean doSSLShutdown() {
        if (SSL.isInInit(ssl) != 0) {
            // Only try to call SSL_shutdown if we are not in the init state anymore.
            // Otherwise we will see 'error:140E0197:SSL routines:SSL_shutdown:shutdown while in init' in our logs.
            //
            // See also http://hg.nginx.org/nginx/rev/062c189fee20
            return false;
        }
        int err = SSL.shutdownSSL(ssl);
        if (err < 0) {
            int sslErr = SSL.getError(ssl, err);
            if (sslErr == SSL.SSL_ERROR_SYSCALL || sslErr == SSL.SSL_ERROR_SSL) {
                if (logger.isDebugEnabled()) {
                    int error = SSL.getLastErrorNumber();
                    logger.debug("SSL_shutdown failed: OpenSSL error: {} {}", error, SSL.getErrorString(error));
                }
                // There was an internal error -- shutdown
                shutdown();
                return false;
            }
            SSL.clearError();
        }
        return true;
    }
846546
function() {
        if (!this._startupSchedule || !this._shutdownSchedule) {
            return true;
        }

        var lastStartup = later.schedule(this._startupSchedule).prev().getTime();
        var lastShutdown = later.schedule(this._shutdownSchedule).prev().getTime();
        return lastStartup > lastShutdown;
    }
1168504
public static synchronized void shutdown() {
        logger.info(Messages.get("info.service.shutdown"));
        if (container != null)
            try {
                container.shutdown();
            } catch (Exception e) {
                logger.error(Messages.get("info.service.error.shutdown"), e);
            }
        logger.info(Messages.get("info.service.shutdown.done"));
    }
1074519
public boolean stop(ShutdownModeAmp mode)
  {
    Objects.requireNonNull(mode);
    
    if (! _lifecycle.toStop()) {
      return false;
    }
    
    _shutdownMode = mode;

    /*
    if (_podBuilder != null) {
      ServiceRefAmp.toServiceRef(_podBuilder).shutdown(mode);
      ServiceRefAmp.toServiceRef(_podsDeployService).shutdown(mode);
      ServiceRefAmp.toServiceRef(_podsConfigService).shutdown(mode);
    }
    */

    return true;
  }
951940
@Override
    public void shutdown() {
        if (state.get() == NodeState.Shutdown) {
            return;
        }
        balancingPolicy.shutdown();
        if (autoRebalanceFuture != null) {
            autoRebalanceFuture.cancel(true);
        }
        LOG.info("Shutdown initiated; beginning drain...");
        setState(NodeState.Draining);
        balancingPolicy.drainToCount(0, true);
    }
1358685
public final synchronized void shutdown() {
        if (DESTROYED_UPDATER.compareAndSet(this, 0, 1)) {
            engineMap.remove(ssl);
            SSL.freeSSL(ssl);
            ssl = networkBIO = 0;

            isInboundDone = outboundClosed = true;
        }

        // On shutdown clear all errors
        SSL.clearError();
    }
839187
@Override
	public void shutdown() {
		if (collection != null) {
			try {
				collection.shutdown();
			} catch (IOException e) {
				LOGGER.severe("FAILED collection shutdown" + e.getMessage());
			}
		}
		if (exclusionFactory != null) {
			exclusionFactory.shutdown();
		}
	}
1053293
public void shutdown() {
	accept = false;
	try {
	    _server.close();
	} catch(Exception e) {}
	// this is a hack to ensue the server socket is
	// unblocked from accpet()
	// but this is not guaranteed to work still
        SocketFactory factory = SocketFactory.getDefault();
	Socket s = null;
	try {
	    s = factory.createSocket(InetAddress.getLocalHost(), getPort());
	    s.getInputStream();
	} catch (Exception e) {
	    // can be ignored
	} finally {
	    if (s != null) {
		try { s.close(); } catch (Exception e) {}
	    }
	}

	// reset everything
        serverThread = null;
        _server = null;
    }