git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5942 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 21930d05ed
commit 8ee3a94e82

@ -433,6 +433,31 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> exte
cache.put(tha, container);
}
}
/*
public void add(final byte[] termHash, final ReferenceType newEntry) {
assert this.cache != null;
ByteArray tha = new ByteArray(termHash);
// first access the cache without synchronization
ReferenceContainer<ReferenceType> container = cache.remove(tha);
if (container == null) container = new ReferenceContainer<ReferenceType>(factory, termHash, this.payloadrow, 1);
container.put(newEntry);
// then try to replace the entry that should be empty,
// but it can be possible that another thread has written something in between
ReferenceContainer<ReferenceType> containerNew = cache.put(tha, container);
if (containerNew == null) return;
container = containerNew;
// finally use synchronization: ensure that the entry is written exclusively
synchronized (cache) {
containerNew = cache.get(tha);
if (containerNew != null) container.putAllRecent(containerNew);
cache.put(tha, container);
}
}
*/
public int minMem() {
return 0;

@ -316,6 +316,7 @@ public final class plasmaSearchQuery {
"*" + new String(Word.word2hash(this.ranking.toExternalString())) +
"*" + this.prefer +
"*" + this.urlMask +
"*" + this.sitehash +
"*" + this.targetlang +
"*" + this.constraint +
"*" + this.maxDistance;

Loading…
Cancel
Save