small fixes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5161 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 73f233bb11
commit 25a62cdc3f

@ -494,7 +494,7 @@ proxyIndexingLocalMedia=true
# Be careful with this number. Consider a branching factor of average 20;
# A prefetch-depth of 8 would index 25.600.000.000 pages, maybe the whole WWW.
crawlingDepth=3
crawlingIfOlder=525600
crawlingIfOlder=-1
crawlingDomFilterDepth=-1
crawlingDomMaxPages=-1
indexText=true

@ -54,11 +54,14 @@ public final class kelondroMScoreCluster<E> {
* shrink the cluster to a demanded size
* @param maxsize
*/
public void shrinkToMaxSize(int maxsize) {
public synchronized void shrinkToMaxSize(int maxsize) {
if (maxsize < 0) return;
Long key;
while (refkeyDB.size() > maxsize) {
// find and remove smallest objects until cluster has demanded size
refkeyDB.remove(keyrefDB.remove(keyrefDB.firstKey()));
key = keyrefDB.firstKey();
if (key == null) break;
refkeyDB.remove(keyrefDB.remove(key));
}
}
@ -66,12 +69,13 @@ public final class kelondroMScoreCluster<E> {
* shrink the cluster in such a way that the smallest score is equal or greater than a given minScore
* @param minScore
*/
public void shrinkToMinScore(int minScore) {
public synchronized void shrinkToMinScore(int minScore) {
int score;
Long key;
while (true) {
// find and remove objects where their score is smaller than the demanded minimum score
key = keyrefDB.firstKey();
if (key == null) break;
score = (int) ((key.longValue() & 0xFFFFFFFF00000000L) >> 32);
if (score >= minScore) break;
refkeyDB.remove(keyrefDB.remove(key));

Loading…
Cancel
Save