!str #17090 add AsyncStage

This commit is contained in:
Roland Kuhn 2015-04-09 22:28:16 +02:00
parent ad3829cd74
commit 4c623fade7
66 changed files with 981 additions and 787 deletions

View file

@ -117,7 +117,7 @@ public class SourceTest extends StreamTest {
public StageState<Integer, Integer> initial() {
return new StageState<Integer, Integer>() {
@Override
public Directive onPush(Integer element, Context<Integer> ctx) {
public SyncDirective onPush(Integer element, Context<Integer> ctx) {
sum += element;
count += 1;
if (count == 4) {
@ -428,7 +428,7 @@ public class SourceTest extends StreamTest {
public void mustBeAbleToUseMapFuture() throws Exception {
final JavaTestKit probe = new JavaTestKit(system);
final Iterable<String> input = Arrays.asList("a", "b", "c");
Source.from(input).mapAsync(new Function<String, Future<String>>() {
Source.from(input).mapAsync(4, new Function<String, Future<String>>() {
public Future<String> apply(String elem) {
return Futures.successful(elem.toUpperCase());
}