Skip to content

Instantly share code, notes, and snippets.

@musketyr
Created February 15, 2012 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save musketyr/1838901 to your computer and use it in GitHub Desktop.
Save musketyr/1838901 to your computer and use it in GitHub Desktop.
public class StartSeach implements Node<SerialPipe, Collection<Haystack>> {
public NodeResult execute(SerialPipe pipe, Collection<HayStack> haystacks){
return pipe.fork(FindNeedle.class, haystacks);
}
}
public class StartSeach implements Node<ParallelPipe, Haystack> {
public NodeResult execute(ParallelPipe pipe, HayStack haystacks){
// let's find the needle
return pipe.join(HaystackSearched.class, needleFound);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment