Executes the methods of the provided objects.

@param \SplObjectStorage $shutdownObjects
@return void
338785
protected function callShutdownMethods(\SplObjectStorage $shutdownObjects)
    {
        foreach ($shutdownObjects as $object) {
            $methodName = $shutdownObjects[$object];
            $object->$methodName();
        }
    }
1087692
public function process(Collection $items, Closure $cb, Closure $error = null): void
    {
        $items->each(function ($item) use ($cb, $error): void {
            try {
                $cb($item);
            } catch (Exception $e) {
                if (! $error) {
                    throw $e;
                }

                $error($e);
            }
        });
    }
406937
public function shutdown($response = null)
    {

        $this->collectGarbage();
        $applicationEvent = $this->getApplicationEvent();
        $applicationEvent->setResponse($response);
        $applicationEvent->setName(self::EVENT_SYSTEM_SHUTDOWN);
        $this->emit($applicationEvent, $this->terminateOutputBuffering(1, $response));
    }
421617
private function shutdown(): void
    {
        $this->connectionPool->shutdown();

        foreach ($this->connectionHandlers as $connectionHandler) {
            $connectionHandler->shutdown();
        }

        while ($this->connectionPool->count() > 0) {
            $this->processConnectionPool();
        }

        $this->connectionPool->close();
    }
151327
public function detachAll($clearContents = false)
    {
        $this->observer = new SplObjectStorage();

        if (true === $clearContents) {
            $this->clear();
        }
    }
643874
public function shutdown()
    {
        if ($this->is_prepared === true) {
            $this
                ->getSession()
                ->getConnection()
                ->executeAnonymousQuery(sprintf(
                    "deallocate %s",
                    $this->getSession()->getConnection()->escapeIdentifier($this->getClientIdentifier())
                ));

            $this->is_prepared = false;
        }
    }
789957
public static void shutdownObject(Object obj, Logger log) {
    if (obj instanceof Service) {
      ((Service) obj).stopAsync();
    } else if (obj instanceof Closeable) {
      try {
        ((Closeable) obj).close();
      } catch (IOException ioe) {
        log.error("Failed to close {}.", obj);
      }
    }
  }
346970
@Override
    public void run() {
        try {
            shutdown();
        } catch (IOException ex) {
            LOGGER.log(Level.SEVERE, "Error during shutdown", ex);
        }
    }
625801
public function detach(SplObserver $observer)
    {
        if (!isset($this->__observers)) {
            $this->__observers = new SplObjectStorage;
        }
        $this->__observers->detach($observer);
    }
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();
        }
    }
542026
public function setObjects(array $objects)
    {
        foreach ($objects as $object) {
            $this->checkType(ObjectInFolderDataInterface::class, $object);
        }

        $this->objects = $objects;
    }
862956
public static synchronized void runOperations() {
        try {
            for (Runnable shutdownOperation : shutdownOperations) {
                try {
                    shutdownOperation.run();
                } catch (Exception e) {
                    LOG.warn("Error occurred running shutdown operation: " + e.getMessage(), e);
                }
            }
        } finally {
            shutdownOperations.clear();
            shutdownOperations.addAll(preservedShutdownOperations);
        }
    }
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;
	}
354901
void shutdown() throws IOException {
        synchronized (this) {
            for (BdbEnvironmentInfo envInfo : this.envInfos) {
                try {
                    envInfo.getClassCatalog().close();
                } catch (DatabaseException ignore) {
                    LOGGER.log(Level.SEVERE, "Failure closing class catalog", ignore);
                }
                envInfo.closeAndRemoveAllDatabaseHandles();
                
                try (Environment env = envInfo.getEnvironment()) {
                    if (this.deleteOnExit) {
                        FileUtil.deleteDirectory(env.getHome());
                    }
                }
            }
            this.envInfos.clear();
        }
    }
1129876
protected function broadcastToClients(\SplObjectStorage $clients)
    {
        foreach ($clients as $client) {
            $client->sendString($this->processOutput());
        }
    }
1269976
public function execute($ids)
    {
        $storeIds = array_keys($this->storeManager->getStores());

        foreach ($storeIds as $storeId) {
            $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]);
            $this->indexerHandler->deleteIndex([$dimension], new \ArrayObject($ids));
            $this->indexerHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId, $ids));
        }
    }
252601
public function shutdown($status = 0)
    {
        if ($this->status === null) {
            $this->status = $status;
            $this->emit('exit', $status);
        }
    }