From e3179a63942ec28b721fed5460e671d8e8ac86b0 Mon Sep 17 00:00:00 2001 From: borg-0300 Date: Thu, 3 Nov 2005 14:07:58 +0000 Subject: [PATCH] added getOwnSeedFile() git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1022 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaSwitchboard.java | 10 +++++++++- source/de/anomic/yacy/yacySeedDB.java | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index 32c23002c..03c7861b7 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -460,7 +460,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser //try{Thread.currentThread().sleep(5000);} catch (InterruptedException e) {} // for profiler this.yc = new yacyCore(this); //log.logSystem("Started YaCy Protocol Core"); - System.gc(); try{Thread.currentThread().sleep(5000);} catch (InterruptedException e) {} // for profiler +// System.gc(); try{Thread.currentThread().sleep(5000);} catch (InterruptedException e) {} // for profiler serverInstantThread.oneTimeJob(yc, "loadSeeds", yacyCore.log, 3000); // initializing the stackCrawlThread @@ -837,6 +837,14 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser return hasDoneSomething; } + /** + * Creates a new File instance with absolute path of ours Seed File.
+ * @return a new File instance + */ + public File getOwnSeedFile() { + return new File(getRootPath(), getConfig("yacyOwnSeedFile", "mySeed.txt")); + } + /** * With this function the crawling process can be paused */ diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java index cb0445a22..5c26b2716 100644 --- a/source/de/anomic/yacy/yacySeedDB.java +++ b/source/de/anomic/yacy/yacySeedDB.java @@ -118,7 +118,7 @@ public final class yacySeedDB { seedPotentialDB = openSeedTable(seedPotentialDBFile); // create or init own seed - myOwnSeedFile = new File(sb.getRootPath(), sb.getConfig("yacyOwnSeedFile", "mySeed.txt")); + myOwnSeedFile = sb.getOwnSeedFile(); if (myOwnSeedFile.length() > 0) { // load existing identity mySeed = yacySeed.load(myOwnSeedFile);