=str #15707 name unnamed modules
* give name attribute to TickSource and nested modules * reflow module toString output * give toString to flow
This commit is contained in:
parent
3b9b95b0eb
commit
ee5ec72552
14 changed files with 48 additions and 36 deletions
|
|
@ -1,13 +1,17 @@
|
|||
package docs;
|
||||
|
||||
import akka.actor.Cancellable;
|
||||
import akka.japi.Pair;
|
||||
import akka.japi.function.Function;
|
||||
import akka.stream.*;
|
||||
import akka.stream.javadsl.*;
|
||||
import scala.Option;
|
||||
import scala.concurrent.duration.FiniteDuration;
|
||||
import scala.concurrent.Promise;
|
||||
import scala.runtime.BoxedUnit;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class MigrationsJava {
|
||||
|
||||
// This is compile-only code, no need for actually running anything.
|
||||
|
|
@ -110,6 +114,11 @@ public class MigrationsJava {
|
|||
Source<Integer, Promise<Option<Integer>>> src = Source.<Integer>maybe();
|
||||
// Complete the promise with an empty option to emulate the old lazyEmpty
|
||||
promise.trySuccess(scala.Option.empty());
|
||||
|
||||
final Source<String, Cancellable> sourceUnderTest = Source.tick(
|
||||
FiniteDuration.create(0, TimeUnit.MILLISECONDS),
|
||||
FiniteDuration.create(200, TimeUnit.MILLISECONDS),
|
||||
"tick");
|
||||
//#source-creators
|
||||
|
||||
//#empty-flow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue