/* (non-Javadoc)
@see com.ibm.jaggr.service.IShutdownListener#shutdown(com.ibm.jaggr.service.IAggregator)
163181
@Override
	public void shutdown(IAggregator aggregator) {
		for (IServiceRegistration reg : serviceRegs) {
			reg.unregister();
		}
		serviceRegs.clear();
	}
413543
public void shutdown() {
    if (mbeanName != null) {
      MBeanUtil.unregisterMBean(mbeanName);
    }
    if (versionBeanName != null) {
      MBeanUtil.unregisterMBean(versionBeanName);
    }
    if (namenodeMXBeanName != null) {
      MBeanUtil.unregisterMBean(namenodeMXBeanName);
    }
  }
1305978
@Override
  public void shutdown(ShutdownModeAmp mode)
  {
    QueryMap queryMap = _queryMapRef.get();
    
    if (queryMap != null) {
      queryMap.close();
    }
  }
646058
public void shutdown()
    {
        Environment env = ((BaseApplication)m_app).getEnvironment();
        if (m_app != null)
        	m_app.free();
        m_app = null;
        if (ClassServiceUtility.getClassService().getClassFinder(null) != null)
            ClassServiceUtility.getClassService().getClassFinder(null).shutdownService(null, this);
        if (env != null)
        	env.freeIfDone();
//x        System.exit(0);
    }
1044507
public static synchronized void shutdown() {
		if (BACKGROUND_SERVICE != null) {
			try {
				BACKGROUND_SERVICE.stop();
			} catch (Throwable t) {
				LOGGER.error("Exception stopping Stackify Metrics API service", t);
			}
			
			INITIALIZED.compareAndSet(true, false);
		}
	}
845688
public void shutdown() {
    getLogger().info(getPath() + " shutdown");
    active = false;
    try {
      if (reader != null) {
        reader.close();
        reader = null;
      }
    } catch (IOException ioe) {
      ioe.printStackTrace();
    }
  }
1213213
private void shutdown() throws IOException {
        ready.set(false);
        sendMessage(FirmataMessageFactory.analogReport(false));
        sendMessage(FirmataMessageFactory.digitalReport(false));
        parser.stop();
        transport.stop();
    }
1373389
@Override
    public void shutdown() {
        try {
            verifyMaintainability();
        } catch (VerificationFailedException ex) {
            throw new RuntimeException("Can not shutdown " + this + "!", ex);
        }

        this.shutdownInitiated = true;
        try {
            dataObservable.shutdown();
        } finally {
            try {
                deactivate();
            } catch (CouldNotPerformException | InterruptedException ex) {
                ExceptionPrinter.printHistory("Could not shutdown " + this + "!", ex, logger);
            }
        }
    }
835571
public void shutdown() {
    log.info("Notifying device listener about shutdown");
    for (HardwareDeviceListener listener : deviceListeners) {
      for (AndroidDevice device : connectedDevices.values()) {
        listener.onDeviceDisconnected(connectedDevices.get(device));
      }
    }
    log.info("Removing Device Manager listener from ADB");
    AndroidDebugBridge.removeDeviceChangeListener(this);
    if (!shouldKeepAdbAlive) {
      AndroidDebugBridge.disconnectBridge();
    }
    AndroidDebugBridge.terminate();
    log.info("stopping Device Manager");
    // TODO add thread interrupt and join handling
  }
968749
public static synchronized void shutdown() {
		if (LOG_APPENDER != null) {
			try {
				LOG_APPENDER.close();
			} catch (Throwable t) {
				LOGGER.error("Exception stopping Stackify Log API service", t);
			}
		}
	}
1021826
@Override
    public void shutdown() {
        if (this.bootstrap != null) {
            AccessController.doPrivileged(new PrivilegedAction<Void>() {
                @Override
                public Void run() {
                    bootstrap.shutdown();
                    return null;
                }
            });

            this.bootstrap = null;

            this.deploymentDBAs.clear();
            this.applicationBDAs.clear();
            this.classloader = null;
            this.extensionClassLoaders.clear();
            this.cdiEnabled = false;
            this.cdiStatusMap.clear();
            this.application = null;
            this.classBDAMap.clear();
        }
    }
234524
@Override
    public void shutdown ()
    {
        _shutdownRequested = true;
        _queue.append(new Unit() {
            @Override public boolean invoke () {
                _running = false;
                return false;
            }
        });
    }
1302705
@Override
  public void shutdown(ShutdownModeAmp mode)
  {
    if (! _lifecycle.toStopping()) {
      return;
    }
    
    _lifecycle.toDestroy();
    
    OnShutdownMessage shutdownMessage = new OnShutdownMessage(this, mode, isSingle());
    
    _queue.offer(shutdownMessage);
    
    // _queue.close();
    /*
    for (Actor<?> actorProcessor : _queueActors) {
      actorProcessor.close();
    }
    */
    
    _queue.wakeAllAndWait();

    shutdownMessage.waitFor(1, TimeUnit.SECONDS);
    
    super.shutdown(mode);

    try (OutboxAmp outbox = OutboxAmp.currentOrCreate(manager())) {
      Object ctx = outbox.getAndSetContext(this);
      
      try {
        outbox.flush();
        
        if (! isSingle()) {
          _worker.shutdown(mode);
        }
      } finally {
        outbox.getAndSetContext(ctx);
      }
    }

    // XXX: _worker.shutdown(ShutdownModeAmp.IMMEDIATE);
  }
986080
final void shutdown() {

      boolean deactivated = false;
      try {
         deactivated = deactivate();
      } catch(InterruptedException ie) {
         Thread.currentThread().interrupt();
      }

      if(!deactivated) {
         deactivateNow();
      }

      reopenService.shutdownNow();
      reopenExecutor.shutdown();

      for(Thread closerThread : closerThreads) {
         closerThread.interrupt();
      }

   }
36200
@Override
    public boolean shutdownService(Object service, BundleContext context)
    {
        if (this.service != null)
            ((HttpServiceTracker)this.service).close();
        return true;
    }
1356189
@Override
    public void shutdown() throws BatchContainerServiceException {
        logger.entering(CLASSNAME, "shutdown");
        logger.fine("do nothing");
        logger.exiting(CLASSNAME, "shutdown");
    }
963807
@Override
	public void shutdown() throws PluginException {
		if (storage != null) {
			try {
				storage.shutdown();
			} catch (PluginException pe) {
				log.error("Failed to shutdown storage: {}", pe.getMessage());
				throw pe;
			}
		}
		if (indexer != null) {
			try {
				indexer.shutdown();
			} catch (PluginException pe) {
				log.error("Failed to shutdown indexer: {}", pe.getMessage());
				throw pe;
			}
		}
	}