git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4135 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2007-10-03 15:34:16 +00:00
parent 711641f167
commit 143fa40d77
2 changed files with 4 additions and 4 deletions

View File

@ -392,7 +392,8 @@ public final class indexRAMRI implements indexRI {
}
public synchronized indexContainer getContainer(String wordHash, Set urlselection) {
if (wordHash == null) return null;
// retrieve container
indexContainer container = (indexContainer) cache.get(wordHash);

View File

@ -192,13 +192,12 @@ public final class plasmaWordIndex implements indexRI {
}
private void flushCache(indexRAMRI ram, int count) {
if (ram.size() <= count) count = ram.size();
if (count <= 0) return;
if (count > 5000) count = 5000;
busyCacheFlush = true;
String wordHash;
ArrayList containerList = new ArrayList();
synchronized (ram) {
count = Math.min(5000, Math.min(count, ram.size()));
if (count <= 0) return;
boolean collectMax = true;
indexContainer c;
while (collectMax) {