Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
javadoc
lotus5cf0cbb47ed9
diff --git a/source/de/anomic/crawler/ResourceObserver.java b/source/de/anomic/crawler/ResourceObserver.javaindex b228986b5..97c229eab 100644--- a/source/de/anomic/crawler/ResourceObserver.java+++ b/source/de/anomic/crawler/ResourceObserver.java@@ -55,6 +55,11 @@ public final class ResourceObserver {private int disksFree;private int memoryFree;+ /**+ * The ResourceObserver checks the resources+ * and pauses crawls if necessary+ * @param sb the plasmaSwitchboard+ */public ResourceObserver(final plasmaSwitchboard sb) {this.sb = sb;this.log.logInfo("initializing the resource observer");@@ -87,6 +92,9 @@ public final class ResourceObserver {memoryFree = HIGH;}+ /**+ * checks the resources and pauses crawls if necessary+ */public void resourceObserverJob() {checkDiskUsageCount++;checkMemoryUsageCount++;@@ -126,10 +134,16 @@ public final class ResourceObserver {}}+ /**+ * @return <code>true</code> if disk space is available+ */public boolean getDisksOK () {return disksFree == HIGH;}+ /**+ * @return <code>true</code> if memory is available+ */public boolean getMemoryOK () {return memoryFree == HIGH;}@@ -149,7 +163,6 @@ public final class ResourceObserver {* <li><code>LOW</code> if lower than 100MB or 1/5 disk space is available</li>* </ul>*/-private int checkDisks() {int ret = HIGH;