void ReplicationManager::onPrepareShutdown() { getModule()->quit(); getModule()->join(); signalIsReadyForShutdown(); }
/* Close all server protocols so that we cannot create new clients. */ void ProtocolManager::onPrepareShutdown() { HAGGLE_DBG("%lu protocols are registered, shutting down servers.\n", protocol_registry.size()); // Go through the registered protocols protocol_registry_t::iterator it = protocol_registry.begin(); for (; it != protocol_registry.end(); it++) { // Tell the server protocol to shutdown, with the exception of the // application IPC protocol if ((*it).second->isServer() && !((*it).second->isApplication())) { (*it).second->shutdown(); } } signalIsReadyForShutdown(); }
void SecurityManager::onPrepareShutdown() { Mutex::AutoLocker l(certStoreMutex); // Save our private key kernel->getDataStore()->insertRepository(new RepositoryEntry(getName(), "privkey", RSAPrivKeyToString(privKey))); // Save all certificates for (CertificateStore_t::iterator it = certStore.begin(); it != certStore.end(); it++) { kernel->getDataStore()->insertRepository(new RepositoryEntry(getName(), (*it).second->getSubject().c_str(), (*it).second->toPEM())); } signalIsReadyForShutdown(); }