added shotdown to crawl stacker (moved from 882)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@889 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 2851658c2a
commit 4c7918f5b5

@ -88,6 +88,23 @@ public final class plasmaCrawlStacker {
}
public void close() {
try {
this.log.logFine("Shutdown. Terminationg worker threads.");
if (this.theWorkerPool != null) this.theWorkerPool.close();
} catch (Exception e1) {
this.log.logSevere("Unable to shutdown all remaining stackCrawl threads", e1);
}
try {
this.log.logFine("Shutdown. Closing stackCrawl queue.");
if (this.queue != null) this.queue.close();
this.queue = null;
} catch (IOException e) {
this.log.logSevere("DB could not be closed properly.", e);
}
}
public int size() {
return this.queue.size();
}

@ -633,6 +633,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
userDB.close();
messageDB.close();
if (facilityDB != null) facilityDB.close();
sbStackCrawlThread.close();
urlPool.close();
profiles.close();
robots.close();

Loading…
Cancel
Save