=doc using java.time.Duration for stream's javadsl
This commit is contained in:
parent
3685ce619e
commit
c354aa0b6a
13 changed files with 100 additions and 119 deletions
|
|
@ -65,7 +65,7 @@ public class FlowTest extends StreamTest {
|
|||
final java.lang.Iterable<Integer> input = Arrays.asList(0, 1, 2, 3, 4, 5);
|
||||
final Source<Integer, NotUsed> ints = Source.from(input);
|
||||
final Flow<Integer, String, NotUsed> flow1 = Flow.of(Integer.class).drop(2).take(3
|
||||
).takeWithin(FiniteDuration.create(10, TimeUnit.SECONDS
|
||||
).takeWithin(java.time.Duration.ofSeconds(10
|
||||
)).map(new Function<Integer, String>() {
|
||||
public String apply(Integer elem) {
|
||||
return lookup[elem];
|
||||
|
|
@ -80,7 +80,7 @@ public class FlowTest extends StreamTest {
|
|||
public java.util.List<String> apply(java.util.List<String> elem) {
|
||||
return elem;
|
||||
}
|
||||
}).groupedWithin(100, FiniteDuration.create(50, TimeUnit.MILLISECONDS)
|
||||
}).groupedWithin(100, java.time.Duration.ofMillis(50)
|
||||
).mapConcat(new Function<java.util.List<String>, java.lang.Iterable<String>>() {
|
||||
public java.util.List<String> apply(java.util.List<String> elem) {
|
||||
return elem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue