some small fixes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2425 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 479861a3cf
commit 3e9d509c39

@ -103,8 +103,8 @@ public class ViewProfile {
} else {
// read the profile from remote peer
yacySeed seed = yacyCore.seedDB.getConnected(hash);
if (seed == null) {
seed = yacyCore.seedDB.getDisconnected(hash);
if (seed == null) seed = yacyCore.seedDB.getDisconnected(hash);
if (seed != null) {
long lastseen = Math.abs((System.currentTimeMillis() - seed.getLastSeenTime()) / 1000 / 60);
if (lastseen > 120) seed = null; // if contact is too old, we treat it as disconnected
}

@ -26,6 +26,7 @@ package de.anomic.kelondro;
import java.util.Map;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.TreeMap;
import de.anomic.server.serverMemory;
@ -73,10 +74,10 @@ public class kelondroRowBufferedSet extends kelondroRowSet {
synchronized (buffer) {
if (buffer.size() == 0) {
super.removeOne();
} else {
} else try {
//buffer.remove(buffer.keySet().iterator().next());
buffer.remove(buffer.lastKey());
}
} catch (NoSuchElementException e) {}
}
}

@ -149,8 +149,10 @@ public class plasmaSwitchboardQueue {
if ((index < 0) || (index >= sbQueueStack.size())) throw new ArrayIndexOutOfBoundsException();
try {
ArrayList list = sbQueueStack.botList(index);
kelondroRow.Entry entry;
for (int i = 0; i < list.size(); i++) {
list.set(i, new Entry((kelondroRow.Entry) list.get(i)));
entry = (kelondroRow.Entry) list.get(i);
list.set(i, (entry == null) ? null : new Entry(entry));
}
return list;
} catch (kelondroException e) {

Loading…
Cancel
Save