Merge pull request #25951 from RayRoestenburg/wip-context-operators
SourceWithContext and FlowWithContext
This commit is contained in:
commit
a920349090
12 changed files with 1061 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import java.util
|
|||
import java.util.Optional
|
||||
|
||||
import akka.actor.{ ActorRef, Cancellable, Props }
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.event.LoggingAdapter
|
||||
import akka.japi.{ Pair, Util, function }
|
||||
import akka.stream._
|
||||
|
|
@ -3466,4 +3467,11 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[
|
|||
*/
|
||||
def log(name: String): javadsl.Source[Out, Mat] =
|
||||
this.log(name, ConstantFun.javaIdentityFunction[Out], null)
|
||||
|
||||
/**
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
def startContextPropagation[Ctx](extractContext: function.Function[Out, Ctx]): SourceWithContext[Ctx, Out, Mat] =
|
||||
new scaladsl.SourceWithContext(this.asScala.map(x ⇒ (x, extractContext.apply(x)))).asJava
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue