Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5311 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
lotus committed Nov 1, 2008
1 parent 8d07607 commit 5cf0cbb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source/de/anomic/crawler/ResourceObserver.java
Expand Up @@ -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");
Expand Down Expand Up @@ -87,6 +92,9 @@ public ResourceObserver(final plasmaSwitchboard sb) {
memoryFree = HIGH;
}

/**
* checks the resources and pauses crawls if necessary
*/
public void resourceObserverJob() {
checkDiskUsageCount++;
checkMemoryUsageCount++;
Expand Down Expand Up @@ -126,10 +134,16 @@ public void resourceObserverJob() {
}
}

/**
* @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;
}
Expand All @@ -149,7 +163,6 @@ public long getMinFreeDiskSpace () {
* <li><code>LOW</code> if lower than 100MB or 1/5 disk space is available</li>
* </ul>
*/

private int checkDisks() {
int ret = HIGH;

Expand Down

0 comments on commit 5cf0cbb

Please sign in to comment.