Closes all EvaluatorManager instances managed.
484343
@Override
  public void close() {

    LOG.log(Level.FINER, "Closing the evaluators - begin");

    final List<EvaluatorManager> evaluatorsCopy;
    synchronized (this) {
      evaluatorsCopy = new ArrayList<>(this.evaluators.values());
    }

    for (final EvaluatorManager evaluatorManager : evaluatorsCopy) {
      if (!evaluatorManager.isClosedOrClosing()) {
        LOG.log(Level.WARNING, "Unclean shutdown of evaluator {0}", evaluatorManager.getId());
        evaluatorManager.close();
      }
    }

    LOG.log(Level.FINER, "Closing the evaluators - end");
  }
779099
public void close() throws IOException {
    for (Mapper map : mappers) {
      map.close();
    }
    if (reducer != null) {
      reducer.close();
    }
  }
117039
@Override
    public void close() throws Exception {
        if (scopeCleaner.close()) { // executor thread to exit processing loop            
            LOGGER.info("closing PreDestroyMonitor...");
            List<Map.Entry<Object, UnscopedCleanupAction>> actions = new ArrayList<>(cleanupActions.entrySet());
            if (actions.size() > 0) {
                LOGGER.warn("invoking predestroy action for {} unscoped instances", actions.size());
                actions.stream().map(Map.Entry::getValue).collect(
                    Collectors.groupingBy(UnscopedCleanupAction::getContext, Collectors.counting())).forEach((source, count)->{
                        LOGGER.warn("  including {} objects from source '{}'", count, source);
                    });
            }
            actions.stream().sorted(Map.Entry.comparingByValue()).forEach(action->{
                Optional.ofNullable(action.getKey()).ifPresent(obj->action.getValue().call(obj));                    
            });             
            actions.clear();
            cleanupActions.clear();
            scopeBindings.clear();
            scopeBindings = Collections.emptyMap();
        } else {
            LOGGER.warn("PreDestroyMonitor.close() invoked but instance is not running");
        }
    }
225238
public static void deactivateAllCallbackHandlers() {
	synchronized(callbackHandlers) {
	    Enumeration e = callbackHandlers.elements();
	    while(e.hasMoreElements()) {
		CallbackHandler handler = (CallbackHandler)e.nextElement();
		handler.shutdown();
	    }
	    callbackHandlers.clear();
	}
    }
186193
@Override
    public void close() throws Exception {
        try {
            this.servers.stream().filter(Objects::nonNull).forEach(BookieServer::shutdown);
            if (this.zkServer.get() != null) {
                this.zkServer.get().close();
            }
        } finally {
            cleanupDirectories();
        }

        Thread c = this.cleanup.getAndSet(null);
        if (c != null) {
            Runtime.getRuntime().removeShutdownHook(c);
        }
    }
133986
public synchronized void closeImmediatedly() {

        close();

        Iterator iterator = this.connectionsInUse.iterator();

        while (iterator.hasNext()) {
            PooledConnection connection = (PooledConnection) iterator.next();
            SessionConnectionWrapper sessionWrapper =
                (SessionConnectionWrapper) this.sessionConnectionWrappers.get(
                    connection);

            closeSessionWrapper(
                sessionWrapper,
                "Error closing session wrapper. Connection pool was shutdown immediatedly.");
        }
    }
738374
@Override
	public void close() {
		transactionManager.close();
		if (coverageHandlerRef.get() != null) {
			coverageHandlerRef.get().onSqlAgentClose();
		}
	}
177162
public void closeAllPlatforms() {

    log.log(Level.FINEST, "Closing all Vert.x instances");
    try {

      for (Map.Entry<String, Vertx> entry : this.vertxPlatforms.entrySet()) {
        stopVertx(entry.getValue());
      }
      vertxPlatforms.clear();
      vertxHolders.clear();

    } catch (Exception e) {
      log.log(Level.SEVERE, "Error closing Vert.x instance", e.getCause());
    }
  }
343856
final void close() {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "close : " + ivArchivePuId, this);

        // First, prevent any further EntityManager factories from being
        // created. EMFs may be created for each java:comp/env context.
        if (ivEMFMap != null) {
            synchronized (ivEMFMap) {
                ivCreateEMFAllowed = false;
            }
        }

        // Next, shutdown any EntityManager pools that exist.  This will close
        // all of the pooled EMs and prevent the pools from adding any more EMs.
        // This does NOT close any EMs that customers may be actively using...
        // and it is also possible a new pool may be created prior to closing
        // the EMFs below, but the EMF close is gauranteed to close all EMs
        // associated with it.                                             d510184
        synchronized (ivEMPoolMap) {
            if (isTraceOn && tc.isDebugEnabled())
                Tr.debug(tc, "shutting down EM pools : " + ivEMPoolMap.size());

            for (JPAEMPool emPool : ivEMPoolMap.values()) {
                emPool.shutdown();
            }
        }

        unregisterClassFileTransformer(ivClassLoader);

        // Finally, close the base EMF, and any EMFs that have been created
        // for each java:comp/env.
        if (ivEMFactory != null) {
            // d455363 Begins
            if (ivEMFactory.isOpen()) {
                try {
                    if (isTraceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "closing base EMF");
                    ivEMFactory.close();
                } catch (Exception e) {
                    FFDCFilter.processException(e, CLASS_NAME + ".close",
                                                "934", this);

                    if (isTraceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "Caught unexpected exception on factory.close():" + e);
                }
            }
            // d455363 Ends

            // Close all of the factories for each J2EEName when the datasource
            // is defined in java:comp/env.                                 d510184
            if (ivEMFMap != null) {
                for (EntityManagerFactory emFactory : ivEMFMap.values()) {
                    if (emFactory.isOpen()) {
                        try {
                            if (isTraceOn && tc.isDebugEnabled())
                                Tr.debug(tc, "closing component EMF");
                            emFactory.close();
                        } catch (Exception e) {
                            FFDCFilter.processException(e, CLASS_NAME + ".close",
                                                        "934", this);

                            if (isTraceOn && tc.isDebugEnabled())
                                Tr.debug(tc, "Caught unexpected exception on factory.close():" + e);
                        }
                    }
                }
            }
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "close : " + ivArchivePuId);
    }
630017
void closeAndClear() {
		for (Algorithm a : this.idsToAlgorithms.values()) {
			a.close();
		}
		idsToAlgorithms.clear();
		algorithms = null;
	}
858536
public void closeMBeans() {
    try {
      for (final ObjectName name : registeredMBeans) {
        getMbeanServer().unregisterMBean(name);
        logger.info("Jmx MBean " + name.getCanonicalName() + " unregistered.");
      }
    } catch (final Exception e) {
      logger.error("Failed to cleanup MBeanServer", e);
    }
  }
308890
private void closeNonexistingAsyncAppenders() {
        org.apache.log4j.Logger rootLogger = LogManager.getRootLogger();
        if (NFLockFreeLogger.class.isInstance(rootLogger)) {
            ((NFLockFreeLogger)rootLogger).reconcileAppenders();
        }
        Enumeration enums = LogManager.getCurrentLoggers();
        while (enums.hasMoreElements()) {
            Object myLogger = enums.nextElement();
            if (NFLockFreeLogger.class.isInstance(myLogger)) {
                ((NFLockFreeLogger)myLogger).reconcileAppenders();
            }
        }
    }
995557
function closeAll() {
        DeprecationWarning.deprecationWarning("Use CommandManager.execute(Commands.FILE_CLOSE_ALL,{PaneId: MainViewManager.ALL_PANES}) instead of DocumentManager.closeAll()", true);
        CommandManager.execute(Commands.FILE_CLOSE_ALL, {PaneId: MainViewManager.ALL_PANES});
    }
735135
public static void closeSafely(@Nullable Iterable<? extends CloseableReference<?>> references) {
    if (references != null) {
      for (CloseableReference<?> ref : references) {
        closeSafely(ref);
      }
    }
  }
474540
private void closeAndKeepWaitingThreads(boolean completeClose)
   {
      if (!closed.get())
      {
         // cleanup resources obtained by filters
         if (completeClose && recoveryFilters != null)
         {
            for (AbstractRecoveryFilter filter : recoveryFilters)
            {
               filter.close();
            }
            recoveryFilters.clear();
            recoveryFilters = null;
         }

         if (synonymProviderConfigFs != null)
         {
            try
            {
               synonymProviderConfigFs.close();
            }
            catch (IOException e)
            {
               log.warn("Exception while closing FileSystem", e);
            }
         }
         if (spellChecker != null)
         {
            spellChecker.close();
         }
         errorLog.close();
         indexRegister.getDefaultIndex().close();
         getContext().destroy();
         closed.set(true);
         log.info("Index closed: " + path);
         modeHandler.removeIndexerIoModeListener(this);
         if (indexInfos instanceof IndexerIoModeListener)
         {
            modeHandler.removeIndexerIoModeListener((IndexerIoModeListener)indexInfos);
         }
         if (indexUpdateMonitor instanceof IndexerIoModeListener)
         {
            modeHandler.removeIndexerIoModeListener((IndexerIoModeListener)indexUpdateMonitor);
         }

         unscheduleUpdateLoadBatchingThresholdTask();
      }
   }
745365
def close(self):
        """"""
        super(ActorModelRunner, self).close()
        unsubscribe(handler=self.forward_prompt, predicate=self.is_prompt)
        if self.shutdown_on_close:
            self.shutdown()
410629
public synchronized void close() throws IOException {
        if (!opened) {
            return;
        }
        //
        opened = false;
        accessor.close();
        appender.close();
        hints.clear();
        inflightWrites.clear();
        //
        if (managedWriter) {
            ((ExecutorService) writer).shutdown();
            writer = null;
        }
        if (managedDisposer) {
            disposer.shutdown();
            disposer = null;
        }
    }