mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4135 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
711641f167
commit
143fa40d77
|
@ -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);
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user