Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

simplified method call in balancer

orbiter5214f571cd15
diff --git a/source/de/anomic/plasma/plasmaCrawlBalancer.java b/source/de/anomic/plasma/plasmaCrawlBalancer.java
index 241615bff..cf5522160 100644
--- a/source/de/anomic/plasma/plasmaCrawlBalancer.java
+++ b/source/de/anomic/plasma/plasmaCrawlBalancer.java
@@ -142,15 +142,14 @@ public class plasmaCrawlBalancer {
}
}
- public Object[] /*String, byte[]*/ get() throws IOException {
- // returns a pair of domain/hash from the stack
- // if the domain is unknown, a null/hash is returned
+ public byte[] get() throws IOException {
+ // returns an url-hash from the stack
synchronized (domainStacks) {
if (stack.size() > 0) {
- return new Object[]{null, stack.pop().getColBytes(0)};
+ return stack.pop().getColBytes(0);
} else if (domainStacks.size() > 0) {
flushOnce();
- return new Object[]{null, stack.pop().getColBytes(0)};
+ return stack.pop().getColBytes(0);
} else {
return null;
}
diff --git a/source/de/anomic/plasma/plasmaCrawlNURL.java b/source/de/anomic/plasma/plasmaCrawlNURL.java
index fd67e7249..81e376aab 100644
--- a/source/de/anomic/plasma/plasmaCrawlNURL.java
+++ b/source/de/anomic/plasma/plasmaCrawlNURL.java
@@ -404,7 +404,7 @@ public class plasmaCrawlNURL extends indexURL {
private Entry pop(plasmaCrawlBalancer balancer) throws IOException {
// this is a filo - pop
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);
return e;
} else {