parent
508aa9970f
commit
781a9344db
6 changed files with 1 additions and 30 deletions
|
|
@ -20,7 +20,6 @@ import akka.util.JavaDurationConverters._
|
|||
import akka.actor.ActorRef
|
||||
import akka.dispatch.ExecutionContexts
|
||||
import akka.stream.impl.fusing.LazyFlow
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.util.unused
|
||||
import com.github.ghik.silencer.silent
|
||||
|
||||
|
|
@ -3411,9 +3410,7 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr
|
|||
* @param collapseContext turn each incoming pair of element and context value into an element of this Flow
|
||||
* @param extractContext turn each outgoing element of this Flow into an outgoing context value
|
||||
*
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
def asFlowWithContext[U, CtxU, CtxOut](
|
||||
collapseContext: function.Function2[U, CtxU, In],
|
||||
extractContext: function.Function[Out, CtxOut]): FlowWithContext[U, CtxU, Out, CtxOut, Mat] =
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
package akka.stream.javadsl
|
||||
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.japi.{ function, Pair, Util }
|
||||
import akka.stream._
|
||||
import akka.event.LoggingAdapter
|
||||
|
|
@ -16,10 +15,6 @@ import java.util.concurrent.CompletionStage
|
|||
|
||||
import scala.compat.java8.FutureConverters._
|
||||
|
||||
/**
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
object FlowWithContext {
|
||||
|
||||
def create[In, Ctx](): FlowWithContext[In, Ctx, In, Ctx, akka.NotUsed] =
|
||||
|
|
@ -42,9 +37,7 @@ object FlowWithContext {
|
|||
*
|
||||
* An "empty" flow can be created by calling `FlowWithContext[Ctx, T]`.
|
||||
*
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
final class FlowWithContext[In, CtxIn, Out, CtxOut, +Mat](
|
||||
delegate: javadsl.Flow[Pair[In, CtxIn], Pair[Out, CtxOut], Mat])
|
||||
extends GraphDelegate(delegate) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import java.util
|
|||
import java.util.Optional
|
||||
|
||||
import akka.actor.{ ActorRef, Cancellable, Props }
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.event.LoggingAdapter
|
||||
import akka.japi.{ function, Pair, Util }
|
||||
import akka.stream._
|
||||
|
|
@ -3597,10 +3596,6 @@ 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 asSourceWithContext[Ctx](extractContext: function.Function[Out, Ctx]): SourceWithContext[Out, Ctx, Mat] =
|
||||
new scaladsl.SourceWithContext(this.asScala.map(x => (x, extractContext.apply(x)))).asJava
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,14 +7,9 @@ package akka.stream.scaladsl
|
|||
import akka.NotUsed
|
||||
|
||||
import scala.annotation.unchecked.uncheckedVariance
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.japi.Pair
|
||||
import akka.stream._
|
||||
|
||||
/**
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
object FlowWithContext {
|
||||
|
||||
/**
|
||||
|
|
@ -41,9 +36,7 @@ object FlowWithContext {
|
|||
*
|
||||
* An "empty" flow can be created by calling `FlowWithContext[Ctx, T]`.
|
||||
*
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
final class FlowWithContext[-In, -CtxIn, +Out, +CtxOut, +Mat](delegate: Flow[(In, CtxIn), (Out, CtxOut), Mat])
|
||||
extends GraphDelegate(delegate)
|
||||
with FlowWithContextOps[Out, CtxOut, Mat] {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import scala.concurrent.Future
|
|||
import scala.language.higherKinds
|
||||
import scala.annotation.unchecked.uncheckedVariance
|
||||
import akka.NotUsed
|
||||
import akka.annotation.ApiMayChange
|
||||
import akka.dispatch.ExecutionContexts
|
||||
import akka.stream._
|
||||
import akka.util.ConstantFun
|
||||
|
|
@ -19,9 +18,7 @@ import akka.event.LoggingAdapter
|
|||
* Shared stream operations for [[FlowWithContext]] and [[SourceWithContext]] that automatically propagate a context
|
||||
* element with each data element.
|
||||
*
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
trait FlowWithContextOps[+Out, +Ctx, +Mat] {
|
||||
type ReprMat[+O, +C, +M] <: FlowWithContextOps[O, C, M] {
|
||||
type ReprMat[+OO, +CC, +MatMat] = FlowWithContextOps.this.ReprMat[OO, CC, MatMat]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ package akka.stream.scaladsl
|
|||
import java.util.concurrent.CompletionStage
|
||||
|
||||
import akka.actor.{ ActorRef, Cancellable, Props }
|
||||
import akka.annotation.{ ApiMayChange, InternalApi }
|
||||
import akka.annotation.InternalApi
|
||||
import akka.stream.actor.ActorPublisher
|
||||
import akka.stream.impl.Stages.DefaultAttributes
|
||||
import akka.stream.impl.fusing.GraphStages
|
||||
|
|
@ -222,10 +222,6 @@ final class Source[+Out, +Mat](
|
|||
combineRest(2, rest.iterator)
|
||||
})
|
||||
|
||||
/**
|
||||
* API MAY CHANGE
|
||||
*/
|
||||
@ApiMayChange
|
||||
def asSourceWithContext[Ctx](f: Out => Ctx): SourceWithContext[Out, Ctx, Mat] =
|
||||
new SourceWithContext(this.map(e => (e, f(e))))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue