less synchronization in plasmaWordIndex

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2416 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent d6a928c2da
commit cfb51fdef1

@ -391,7 +391,6 @@ public final class plasmaWordIndex extends indexAbstractRI implements indexRI {
}
public int size() {
synchronized (ramCache) {
if (useCollectionIndex)
return java.lang.Math.max(collections.size(),
java.lang.Math.max(assortmentCluster.size(),
@ -399,12 +398,10 @@ public final class plasmaWordIndex extends indexAbstractRI implements indexRI {
else
return java.lang.Math.max(assortmentCluster.size(),
java.lang.Math.max(backend.size(), ramCache.size()));
}
}
public int indexSize(String wordHash) {
int size = 0;
synchronized (ramCache) {
try {
plasmaWordIndexFile entity = backend.getEntity(wordHash, true, -1);
if (entity != null) {
@ -415,7 +412,6 @@ public final class plasmaWordIndex extends indexAbstractRI implements indexRI {
if (useCollectionIndex) size += collections.indexSize(wordHash);
size += assortmentCluster.indexSize(wordHash);
size += ramCache.indexSize(wordHash);
}
return size;
}

Loading…
Cancel
Save