89 |
} |
} |
90 |
|
|
91 |
public SetCollector getIds() throws IOException { |
public SetCollector getIds() throws IOException { |
92 |
return cache.getIds(); |
Collector c = map.get("http://fenfire.org/2003/05/published-blocks"); |
93 |
|
final AsyncSetCollector result = new AsyncSetCollector(); |
94 |
|
|
95 |
|
for(Iterator i=cache.getIds().iterator(); i.hasNext();) |
96 |
|
result.receive(i.next()); |
97 |
|
|
98 |
|
c.addCollectionListener(new CollectionListener() { |
99 |
|
public boolean item(Object item) { |
100 |
|
result.receive(new BlockId((String)item)); |
101 |
|
return true; |
102 |
|
} |
103 |
|
public void finish(boolean timeout) { |
104 |
|
result.finish(timeout); |
105 |
|
} |
106 |
|
}); |
107 |
|
return result; |
108 |
} |
} |
109 |
|
|
110 |
public void add(Block b) { |
public void add(Block b) { |