Initiates the shuts down of the listener.
778509
public void shutdown() {
        shuttingDown = true;
        try {
            SocketAddress localAddress = serverSocket.getLocalAddress();
            if (localAddress instanceof InetSocketAddress) {
                InetSocketAddress address = (InetSocketAddress) localAddress;
                Socket client = new Socket(address.getHostName(), address.getPort());
                client.setSoTimeout(1000); // waking the acceptor loop should be quick
                new PingAgentProtocol().connect(client);
            }
        } catch (IOException e) {
            LOGGER.log(Level.FINE, "Failed to send Ping to wake acceptor loop", e);
        }
        try {
            serverSocket.close();
        } catch (IOException e) {
            LOGGER.log(Level.WARNING, "Failed to close down TCP port",e);
        }
    }
1073791
public synchronized void shutdown() {
    getLogger().debug(getName() + " received shutdown request");

    // mark this as no longer running
    active = false;

    if (rThread != null) {
      rThread.interrupt();
      rThread = null;
    }
    if (advertiseViaMulticastDNS) {
        zeroConf.unadvertise();
    }

    doShutdown();
  }
435536
public void shutdown() throws IOException {
		if(shutdownDone) {
			return;
		}
		if(resourceStore != null) {
			resourceStore.shutdown();
		}
		if(resourceIndex != null) {
			resourceIndex.shutdown();
		}
		if(shutdownables != null) {
			for(Shutdownable s : shutdownables) {
				s.shutdown();
			}
		}
		shutdownDone = true;
	}
295130
public void onShutdown() {
        for (String listenerName : registeredFileListeners.keySet()) {
            logger.info("Deregistering File Listener: " + listenerName);
            FileListener listener = registeredFileListeners.get(listenerName);
            listener.stopListening();
        }
    }
1192290
public static void shutdown() {
        if (orbStart != null) {
            orbStart.shutdown();
        }
        if (orb != null) {
            orb.shutdown(true);
            LOGGER.debug("ORB shutdown");
        }
    }
219802
private void shutdown(){
    parent.workerThreads.get(plan).remove(this);
    if (zk != null) {
      try {
        logger.debug("closing " + zk.getSessionId());
        zk.close();
        zk = null;
      } catch (InterruptedException e1) {
        logger.debug(e1);
      }
      logger.debug("shutdown complete");
    }
  }
979346
public void shutdown() {
        lock.lock();
        try {
            isShutdown = true;
            notEmpty.signalAll();
            notFull.signalAll();
        }
        finally {
            lock.unlock();
        }
    }
514623
public void shutdown()
	{
		try {
			thread.signalShutdown();
			thread.join();
			thread = null;
		} catch (InterruptedException e) {
			LOGGER.warn("Interrupted while waiting for queue shutdown, may not have completed cleanly", e);
		}
	}
684520
@Override
    public void shutdown() {
        synchronized (connections) {
            parent.channelCloses(this);
            for (final MessageInbound connection : connections) {
                try {
                    connection.getWsOutbound().close(0, null);
                } catch (final IOException e) {
                    LOG.error("Connection [" + connection.toString() + "] can't be closed.", e);
                } finally {
                    final ExecutorService executorService = connectionThreads.get(connection);
                    if (executorService != null) {
                        executorService.shutdown();
                    }
                    connectionThreads.remove(connection);
                }
            }
            connections.clear();
        }
        callback = null;
    }
9214
public static void shutdown() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "shutdown");
        }
        synchronized (oneAtATime) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "have lock"); // running with fixes (2)");
            }

            if (aioInitialized == AIO_INITIALIZED) {
                // mark the library as shutdown
                aioInitialized = AIO_SHUTDOWN;
                // Shut down sequence for the library...
                closeAllCompletionPorts();
                try {
                    aio_shutdown();
                } catch (AsyncException ae) {
                    // ignore shutdown errors
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "AsyncException occured while shutting down: " + ae.getMessage());
                    }
                }
            }
        } // end-sync
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "shutdown");
        }
    }
1208805
void shutdown() throws InterruptedException {
        m_shouldStop = true;
        if (m_thread != null) {
            m_selector.wakeup();
            m_thread.join();
        }
    }
88321
@Override
    public void shutdown() {
        Throwable shutdownException = null;
        try {
            fire(new ManagerStopping());
        } catch (Exception e) {
            try {
                fireException(e);
            } catch (Exception e2) {
                shutdownException = e2;
            }
        }
        synchronized (this) {
            for (Context context : contexts) {
                context.clearAll();
            }
            contexts.clear();
            extensions.clear();

            runtimeLogger.clear();

            handledThrowables.remove();
        }
        if (shutdownException != null) {
            UncheckedThrow.throwUnchecked(shutdownException);
        }
    }
278705
public void setShutdown(java.util.Collection<String> shutdown) {
        if (shutdown == null) {
            this.shutdown = null;
            return;
        }

        this.shutdown = new com.amazonaws.internal.SdkInternalList<String>(shutdown);
    }
759029
public void shutdown(ShutdownModeAmp mode,
                       ExitCode exitCode, 
                       String msg)
  {
    shutdown(mode, exitCode, msg, null);
  }
484630
public void shutdown() {
        final Connection connection;
        synchronized (this) {
            if(shutdown) return;
            shutdown = true;
            connection = this.connection;
            if(connectTask != null) {
                connectTask.shutdown();
            }
        }
        if (connection != null) {
            connection.closeAsync();
        }
    }
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);
    }
1352050
public void shutdown() {
    if (this.shuttingDown.getAndSet(true)) {
      // Already being shut down
      LOG.warn("DataNode.shutdown() was called while shutting down.");
      return;
    }
    if (infoServer != null) {
      try {
        infoServer.stop();
      } catch (Exception e) {
        LOG.warn("Exception shutting down DataNode", e);
      }
    }
    if (ipcServer != null) {
      ipcServer.stop();
    }
    this.shouldRun = false;
    if (dataXceiverServer != null) {
      ((DataXceiverServer) this.dataXceiverServer.getRunnable()).kill();
      this.dataXceiverServer.interrupt();

      // wait for all data receiver threads to exit
      if (this.threadGroup != null) {
        int retries = 0;
        while (true) {
          this.threadGroup.interrupt();
          LOG.info("Waiting for threadgroup to exit, active threads is " +
                   this.threadGroup.activeCount());
          if (this.threadGroup.activeCount() == 0) {
            break;
          }
          try {
            if (++retries > 600) {
              Thread[] activeThreads = new Thread[this.threadGroup.activeCount()];
              this.threadGroup.enumerate(activeThreads, true);
              LOG.info("Active Threads: " + Arrays.toString(activeThreads));
              LOG.warn("Waited for ThreadGroup to be empty for 10 minutes." + 
                        " SHUTTING DOWN NOW");
              break;
            }
            Thread.sleep(1000);
          } catch (InterruptedException e) {}
        }
      }
      // wait for dataXceiveServer to terminate
      try {
        this.dataXceiverServer.join();
      } catch (InterruptedException ie) {
      }
    }
    
    if (blockCopyExecutor != null && !blockCopyExecutor.isShutdown()) {
      blockCopyExecutor.shutdownNow();
    }
    
    if (namespaceManager != null) {
      namespaceManager.shutDownAll();
    }
    
    if (blockScanner != null) { 
      blockScanner.shutdown();
    }
    if(directoryScanner != null) {
      shutdownDirectoryScanner();
    }
    if (storage != null) {
      try {
        this.storage.unlockAll();
      } catch (IOException ie) {
      }
    }
    if (data != null) {
      data.shutdown();
    }
    if (myMetrics != null) {
      setCountingLoggers(null);
      myMetrics.shutdown();
    }
    this.shutdownMXBean();
  }