simplified method call in balancer

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2303 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 7b0e2521bb
commit 5214f571cd

@ -142,15 +142,14 @@ public class plasmaCrawlBalancer {
} }
} }
public Object[] /*String, byte[]*/ get() throws IOException { public byte[] get() throws IOException {
// returns a pair of domain/hash from the stack // returns an url-hash from the stack
// if the domain is unknown, a null/hash is returned
synchronized (domainStacks) { synchronized (domainStacks) {
if (stack.size() > 0) { if (stack.size() > 0) {
return new Object[]{null, stack.pop().getColBytes(0)}; return stack.pop().getColBytes(0);
} else if (domainStacks.size() > 0) { } else if (domainStacks.size() > 0) {
flushOnce(); flushOnce();
return new Object[]{null, stack.pop().getColBytes(0)}; return stack.pop().getColBytes(0);
} else { } else {
return null; return null;
} }

@ -404,7 +404,7 @@ public class plasmaCrawlNURL extends indexURL {
private Entry pop(plasmaCrawlBalancer balancer) throws IOException { private Entry pop(plasmaCrawlBalancer balancer) throws IOException {
// this is a filo - pop // this is a filo - pop
if (balancer.size() > 0) { if (balancer.size() > 0) {
Entry e = new Entry(new String((byte[]) balancer.get()[1])); Entry e = new Entry(new String(balancer.get()));
stackIndex.remove(e.hash); stackIndex.remove(e.hash);
return e; return e;
} else { } else {

Loading…
Cancel
Save