added getOwnSeedFile()

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1022 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 20 years ago
parent a803a509ae
commit e3179a6394

@ -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.<br>
* @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
*/

@ -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);

Loading…
Cancel
Save