Skip to content

Commit

Permalink
smaller file size for array stacks to support smaller deletion sizes
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7305 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Nov 4, 2010
1 parent 09badc6 commit 4c50d34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/net/yacy/kelondro/blob/ArrayStack.java
Expand Up @@ -79,6 +79,7 @@ public class ArrayStack implements BLOB {
* time-out. Deletions are not made automatically, they must be triggered using this method.
*/

public static final long maxFileSize = Integer.MAX_VALUE;
public static final long oneMonth = 1000L * 60L * 60L * 24L * 365L / 12L;

protected int keylength;
Expand Down Expand Up @@ -109,7 +110,7 @@ public ArrayStack(
this.buffersize = buffersize;
this.heapLocation = heapLocation;
this.fileAgeLimit = oneMonth;
this.fileSizeLimit = (long) Integer.MAX_VALUE;
this.fileSizeLimit = maxFileSize;
this.repositoryAgeMax = Long.MAX_VALUE;
this.repositorySizeMax = Long.MAX_VALUE;
this.trimall = trimall;
Expand Down Expand Up @@ -378,7 +379,7 @@ public void setMaxAge(long maxAge) {

public void setMaxSize(long maxSize) {
this.repositorySizeMax = maxSize;
this.fileSizeLimit = Math.min((long) Integer.MAX_VALUE, maxSize / 10L);
this.fileSizeLimit = Math.min(maxFileSize, maxSize / 100L);
executeLimits();
}

Expand Down

0 comments on commit 4c50d34

Please sign in to comment.