Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
changed startup initialization sequence slightly
orbiter33f97cff7af5
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.javaindex 67fbefcc1..1ef3fff90 100644--- a/source/de/anomic/plasma/plasmaSwitchboard.java+++ b/source/de/anomic/plasma/plasmaSwitchboard.java@@ -982,12 +982,50 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser", " + robots.size() + " entries" +", " + ppRamString(robotsDBFile.length()/1024));+ // start a cache manager+ log.logConfig("Starting HT Cache Manager");++ // create the cache directory+ String cache = getConfig(HTCACHE_PATH, HTCACHE_PATH_DEFAULT);+ cache = cache.replace('\\', '/');+ if (cache.endsWith("/")) { cache = cache.substring(0, cache.length() - 1); }+ if (new File(cache).isAbsolute()) {+ htCachePath = new File(cache); // don't use rootPath+ } else {+ htCachePath = new File(rootPath, cache);+ }+ this.log.logInfo("HTCACHE Path = " + htCachePath.getAbsolutePath());+ long maxCacheSize = 1024 * 1024 * Long.parseLong(getConfig(PROXY_CACHE_SIZE, "2")); // this is megabyte+ String cacheLayout = getConfig(PROXY_CACHE_LAYOUT, PROXY_CACHE_LAYOUT_TREE);+ boolean cacheMigration = getConfigBool(PROXY_CACHE_MIGRATION, true);+ this.cacheManager = new plasmaHTCache(htCachePath, maxCacheSize, ramHTTP_time, cacheLayout, cacheMigration);++ // starting message board+ initMessages(ramMessage_time);++ // starting wiki+ initWiki(ramWiki_time);++ //starting blog+ initBlog(ramBlog_time);++ // Init User DB+ this.log.logConfig("Loading User DB");+ File userDbFile = new File(getRootPath(), DBFILE_USER);+ this.userDB = new userDB(userDbFile, 2000);+ this.log.logConfig("Loaded User DB from file " + userDbFile.getName() ++ ", " + this.userDB.size() + " entries" ++ ", " + ppRamString(userDbFile.length()/1024));++ //Init bookmarks DB+ initBookmarks();+// start indexing managementlog.logConfig("Starting Indexing Management");- wordIndex = new plasmaWordIndex(indexPath, ramRWI_time, log);noticeURL = new plasmaCrawlNURL(plasmaPath, -1);errorURL = new plasmaCrawlEURL(plasmaPath, -1);-+ wordIndex = new plasmaWordIndex(indexPath, ramRWI_time, log);+// set a high maximum cache size to current size; this is adopted later automaticallyint wordCacheMaxCount = Math.max((int) getConfigLong(WORDCACHE_INIT_COUNT, 30000),(int) getConfigLong(WORDCACHE_MAX_COUNT, 20000));@@ -1004,24 +1042,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements serkelondroRecords.setCacheGrowStati(memprereq + (memprereq / 8) + 2 * 1024 * 1024, memprereq);kelondroCache.setCacheGrowStati(memprereq + (memprereq / 8) + 2 * 1024 * 1024, memprereq);- // start a cache manager- log.logConfig("Starting HT Cache Manager");-- // create the cache directory- String cache = getConfig(HTCACHE_PATH, HTCACHE_PATH_DEFAULT);- cache = cache.replace('\\', '/');- if (cache.endsWith("/")) { cache = cache.substring(0, cache.length() - 1); }- if (new File(cache).isAbsolute()) {- htCachePath = new File(cache); // don't use rootPath- } else {- htCachePath = new File(rootPath, cache);- }- this.log.logInfo("HTCACHE Path = " + htCachePath.getAbsolutePath());- long maxCacheSize = 1024 * 1024 * Long.parseLong(getConfig(PROXY_CACHE_SIZE, "2")); // this is megabyte- String cacheLayout = getConfig(PROXY_CACHE_LAYOUT, PROXY_CACHE_LAYOUT_TREE);- boolean cacheMigration = getConfigBool(PROXY_CACHE_MIGRATION, true);- this.cacheManager = new plasmaHTCache(htCachePath, maxCacheSize, ramHTTP_time, cacheLayout, cacheMigration);-// make parserlog.logConfig("Starting Parser");this.parser = new plasmaParser();@@ -1088,26 +1108,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements sernew Object(),Boolean.valueOf(getConfig(CRAWLJOB_GLOBAL_CRAWL_TRIGGER + "_isPaused", "false"))});- // starting board- initMessages(ramMessage_time);-- // starting wiki- initWiki(ramWiki_time);-- //starting blog- initBlog(ramBlog_time);-- // Init User DB- this.log.logConfig("Loading User DB");- File userDbFile = new File(getRootPath(), DBFILE_USER);- this.userDB = new userDB(userDbFile, 2000);- this.log.logConfig("Loaded User DB from file " + userDbFile.getName() +- ", " + this.userDB.size() + " entries" +- ", " + ppRamString(userDbFile.length()/1024));-- //Init bookmarks DB- initBookmarks();-// init cookie-Monitorthis.log.logConfig("Starting Cookie Monitor");this.outgoingCookies = new HashMap();