5404 [main] INFO de.fhopf.akka.Executor - Found 77 results
(Kein echtes Benchmarking)
class SimpleActorMaster extends UntypedActor {
private final ActorRef indexer;
private final ActorRef parser;
public SimpleActorMaster(final PageRetriever pageRetriever,
final IndexWriter indexWriter) {
this.parser = getContext().actorOf(Props.create(
PageParsingActor.class,
pageRetriever));
this.indexer = getContext().actorOf(Props.create(
IndexingActor.class,
new IndexerImpl(indexWriter)));
}
}
public void onReceive(Object o) throws Exception {
if (o instanceof String) {
PageContent content = pageRetriever.fetchPageContent((String) o);
getSender().tell(content, getSelf());
}
}
5847 [main] INFO de.fhopf.akka.Executor - Found 77 results
public ParallelMaster(final Indexer indexer, final PageRetriever pageRetriever) {
parser = getContext().actorOf(Props.create(PageParsingActor.class, pageRetriever)
.withRouter(new RoundRobinRouter(10)));
indexingActor = getContext().actorOf(Props.create(IndexingActor.class, indexer));
}
2315 [main] INFO de.fhopf.akka.Executor - Found 77 results