From 65fc650109aeeb1b87b3dbf007f29d26261241fa Mon Sep 17 00:00:00 2001 From: theli Date: Mon, 25 Apr 2005 16:34:16 +0000 Subject: [PATCH] *) plasmaCrawlLoader shutdown problem fixed (hopefully) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@59 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaCrawlLoader.java | 15 +++++++++++++++ source/de/anomic/plasma/plasmaSwitchboard.java | 3 ++- yacy.parser | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/plasma/plasmaCrawlLoader.java b/source/de/anomic/plasma/plasmaCrawlLoader.java index 803564a7b..d856b3eec 100644 --- a/source/de/anomic/plasma/plasmaCrawlLoader.java +++ b/source/de/anomic/plasma/plasmaCrawlLoader.java @@ -124,6 +124,21 @@ public final class plasmaCrawlLoader extends Thread { // start the crawl loader this.start(); } + + public void close() { + try { + // setting the stop flag to true + this.stopped = true; + + // interrupting the plasmaCrawlLoader + this.interrupt(); + + // waiting for the thread to finish ... + this.join(); + } catch (Exception e) { + // we where interrupted while waiting for the crawlLoader Thread to finish + } + } public ThreadGroup threadStatus() { return this.theThreadGroup; diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index d49bd7197..ada1af810 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -373,6 +373,7 @@ public class plasmaSwitchboard extends serverAbstractSwitch implements serverSwi wordIndex.close(waitingBoundSeconds); log.logSystem("SWITCHBOARD SHUTDOWN STEP 3: sending termination signal to database manager"); try { + cacheLoader.close(); wikiDB.close(); messageDB.close(); facilityDB.close(); @@ -380,7 +381,7 @@ public class plasmaSwitchboard extends serverAbstractSwitch implements serverSwi noticeURL.close(); errorURL.close(); profiles.close(); - parser.close(); + parser.close(); cacheManager.close(); } catch (IOException e) {} log.logSystem("SWITCHBOARD SHUTDOWN TERMINATED"); diff --git a/yacy.parser b/yacy.parser index 51441db29..eea29b5ce 100644 --- a/yacy.parser +++ b/yacy.parser @@ -1 +1,2 @@ -application/pdf=de.anomic.plasma.parser.pdf.pdfParser \ No newline at end of file +application/pdf=de.anomic.plasma.parser.pdf.pdfParser +application/msword=de.anomic.plasma.parser.doc.docParser \ No newline at end of file