fix the build on main (#31251)
* Fix compilation on scala 2.12 * Add mergePrioritizedN to docs * Format Java code
This commit is contained in:
parent
fccb0ca220
commit
332f18c42b
4 changed files with 55 additions and 55 deletions
|
|
@ -269,6 +269,7 @@ the inputs in different ways.
|
|||
|Source/Flow|<a name="mergelatest"></a>@ref[mergeLatest](Source-or-Flow/mergeLatest.md)|Merge multiple sources.|
|
||||
|Source/Flow|<a name="mergepreferred"></a>@ref[mergePreferred](Source-or-Flow/mergePreferred.md)|Merge multiple sources.|
|
||||
|Source/Flow|<a name="mergeprioritized"></a>@ref[mergePrioritized](Source-or-Flow/mergePrioritized.md)|Merge multiple sources.|
|
||||
|Source|<a name="mergeprioritizedn"></a>@ref[mergePrioritizedN](Source/mergePrioritizedN.md)|Merge multiple sources with priorities.|
|
||||
|Source/Flow|<a name="mergesorted"></a>@ref[mergeSorted](Source-or-Flow/mergeSorted.md)|Merge multiple sources.|
|
||||
|Source/Flow|<a name="orelse"></a>@ref[orElse](Source-or-Flow/orElse.md)|If the primary source completes without emitting any elements, the elements from the secondary source are emitted.|
|
||||
|Source/Flow|<a name="prepend"></a>@ref[prepend](Source-or-Flow/prepend.md)|Prepends the given source to the flow, consuming it until completion before the original source is consumed.|
|
||||
|
|
@ -499,6 +500,7 @@ For more background see the @ref[Error Handling in Streams](../stream-error.md)
|
|||
* [mergeLatest](Source-or-Flow/mergeLatest.md)
|
||||
* [mergePreferred](Source-or-Flow/mergePreferred.md)
|
||||
* [mergePrioritized](Source-or-Flow/mergePrioritized.md)
|
||||
* [mergePrioritizedN](Source/mergePrioritizedN.md)
|
||||
* [MergeSequence](MergeSequence.md)
|
||||
* [mergeSorted](Source-or-Flow/mergeSorted.md)
|
||||
* [monitor](Source-or-Flow/monitor.md)
|
||||
|
|
|
|||
|
|
@ -208,10 +208,8 @@ class SourceOrFlow {
|
|||
Source<Integer, NotUsed> sourceA = Source.from(Arrays.asList(1, 2, 3, 4));
|
||||
Source<Integer, NotUsed> sourceB = Source.from(Arrays.asList(10, 20, 30, 40));
|
||||
Source<Integer, NotUsed> sourceC = Source.from(Arrays.asList(100, 200, 300, 400));
|
||||
List<Pair<Source<Integer, ?>,Integer>> sourcesAndPriorities = Arrays.asList(
|
||||
new Pair<>(sourceA, 9900),
|
||||
new Pair<>(sourceB, 99),
|
||||
new Pair<>(sourceC, 1));
|
||||
List<Pair<Source<Integer, ?>, Integer>> sourcesAndPriorities =
|
||||
Arrays.asList(new Pair<>(sourceA, 9900), new Pair<>(sourceB, 99), new Pair<>(sourceC, 1));
|
||||
Source.mergePrioritizedN(sourcesAndPriorities, false).runForeach(System.out::println, system);
|
||||
// prints e.g. 1, 100, 2, 3, 4, 10, 20, 30, 40, 200, 300, 400 since both sources have their
|
||||
// first element ready and
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ import akka.stream.scaladsl.Sink
|
|||
case _ => throw new IllegalArgumentException("Cannot initialize from state when snapshots are not used.")
|
||||
}
|
||||
}
|
||||
persistenceTestKit.persistForRecovery(persistenceId.id, events)
|
||||
persistenceTestKit.persistForRecovery(persistenceId.id, collection.immutable.Seq.empty ++ events)
|
||||
|
||||
restart()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue