Remove API may change for flow with context

Refs #26897
This commit is contained in:
Christopher Batey 2019-06-06 10:41:02 +01:00
parent 508aa9970f
commit 781a9344db
6 changed files with 1 additions and 30 deletions

View file

@ -20,7 +20,6 @@ import akka.util.JavaDurationConverters._
import akka.actor.ActorRef import akka.actor.ActorRef
import akka.dispatch.ExecutionContexts import akka.dispatch.ExecutionContexts
import akka.stream.impl.fusing.LazyFlow import akka.stream.impl.fusing.LazyFlow
import akka.annotation.ApiMayChange
import akka.util.unused import akka.util.unused
import com.github.ghik.silencer.silent 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 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 * @param extractContext turn each outgoing element of this Flow into an outgoing context value
* *
* API MAY CHANGE
*/ */
@ApiMayChange
def asFlowWithContext[U, CtxU, CtxOut]( def asFlowWithContext[U, CtxU, CtxOut](
collapseContext: function.Function2[U, CtxU, In], collapseContext: function.Function2[U, CtxU, In],
extractContext: function.Function[Out, CtxOut]): FlowWithContext[U, CtxU, Out, CtxOut, Mat] = extractContext: function.Function[Out, CtxOut]): FlowWithContext[U, CtxU, Out, CtxOut, Mat] =

View file

@ -4,7 +4,6 @@
package akka.stream.javadsl package akka.stream.javadsl
import akka.annotation.ApiMayChange
import akka.japi.{ function, Pair, Util } import akka.japi.{ function, Pair, Util }
import akka.stream._ import akka.stream._
import akka.event.LoggingAdapter import akka.event.LoggingAdapter
@ -16,10 +15,6 @@ import java.util.concurrent.CompletionStage
import scala.compat.java8.FutureConverters._ import scala.compat.java8.FutureConverters._
/**
* API MAY CHANGE
*/
@ApiMayChange
object FlowWithContext { object FlowWithContext {
def create[In, Ctx](): FlowWithContext[In, Ctx, In, Ctx, akka.NotUsed] = 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]`. * An "empty" flow can be created by calling `FlowWithContext[Ctx, T]`.
* *
* API MAY CHANGE
*/ */
@ApiMayChange
final class FlowWithContext[In, CtxIn, Out, CtxOut, +Mat]( final class FlowWithContext[In, CtxIn, Out, CtxOut, +Mat](
delegate: javadsl.Flow[Pair[In, CtxIn], Pair[Out, CtxOut], Mat]) delegate: javadsl.Flow[Pair[In, CtxIn], Pair[Out, CtxOut], Mat])
extends GraphDelegate(delegate) { extends GraphDelegate(delegate) {

View file

@ -8,7 +8,6 @@ import java.util
import java.util.Optional import java.util.Optional
import akka.actor.{ ActorRef, Cancellable, Props } import akka.actor.{ ActorRef, Cancellable, Props }
import akka.annotation.ApiMayChange
import akka.event.LoggingAdapter import akka.event.LoggingAdapter
import akka.japi.{ function, Pair, Util } import akka.japi.{ function, Pair, Util }
import akka.stream._ 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] = def log(name: String): javadsl.Source[Out, Mat] =
this.log(name, ConstantFun.javaIdentityFunction[Out], null) this.log(name, ConstantFun.javaIdentityFunction[Out], null)
/**
* API MAY CHANGE
*/
@ApiMayChange
def asSourceWithContext[Ctx](extractContext: function.Function[Out, Ctx]): SourceWithContext[Out, Ctx, Mat] = def asSourceWithContext[Ctx](extractContext: function.Function[Out, Ctx]): SourceWithContext[Out, Ctx, Mat] =
new scaladsl.SourceWithContext(this.asScala.map(x => (x, extractContext.apply(x)))).asJava new scaladsl.SourceWithContext(this.asScala.map(x => (x, extractContext.apply(x)))).asJava
} }

View file

@ -7,14 +7,9 @@ package akka.stream.scaladsl
import akka.NotUsed import akka.NotUsed
import scala.annotation.unchecked.uncheckedVariance import scala.annotation.unchecked.uncheckedVariance
import akka.annotation.ApiMayChange
import akka.japi.Pair import akka.japi.Pair
import akka.stream._ import akka.stream._
/**
* API MAY CHANGE
*/
@ApiMayChange
object FlowWithContext { object FlowWithContext {
/** /**
@ -41,9 +36,7 @@ object FlowWithContext {
* *
* An "empty" flow can be created by calling `FlowWithContext[Ctx, T]`. * 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]) final class FlowWithContext[-In, -CtxIn, +Out, +CtxOut, +Mat](delegate: Flow[(In, CtxIn), (Out, CtxOut), Mat])
extends GraphDelegate(delegate) extends GraphDelegate(delegate)
with FlowWithContextOps[Out, CtxOut, Mat] { with FlowWithContextOps[Out, CtxOut, Mat] {

View file

@ -9,7 +9,6 @@ import scala.concurrent.Future
import scala.language.higherKinds import scala.language.higherKinds
import scala.annotation.unchecked.uncheckedVariance import scala.annotation.unchecked.uncheckedVariance
import akka.NotUsed import akka.NotUsed
import akka.annotation.ApiMayChange
import akka.dispatch.ExecutionContexts import akka.dispatch.ExecutionContexts
import akka.stream._ import akka.stream._
import akka.util.ConstantFun import akka.util.ConstantFun
@ -19,9 +18,7 @@ import akka.event.LoggingAdapter
* Shared stream operations for [[FlowWithContext]] and [[SourceWithContext]] that automatically propagate a context * Shared stream operations for [[FlowWithContext]] and [[SourceWithContext]] that automatically propagate a context
* element with each data element. * element with each data element.
* *
* API MAY CHANGE
*/ */
@ApiMayChange
trait FlowWithContextOps[+Out, +Ctx, +Mat] { trait FlowWithContextOps[+Out, +Ctx, +Mat] {
type ReprMat[+O, +C, +M] <: FlowWithContextOps[O, C, M] { type ReprMat[+O, +C, +M] <: FlowWithContextOps[O, C, M] {
type ReprMat[+OO, +CC, +MatMat] = FlowWithContextOps.this.ReprMat[OO, CC, MatMat] type ReprMat[+OO, +CC, +MatMat] = FlowWithContextOps.this.ReprMat[OO, CC, MatMat]

View file

@ -7,7 +7,7 @@ package akka.stream.scaladsl
import java.util.concurrent.CompletionStage import java.util.concurrent.CompletionStage
import akka.actor.{ ActorRef, Cancellable, Props } import akka.actor.{ ActorRef, Cancellable, Props }
import akka.annotation.{ ApiMayChange, InternalApi } import akka.annotation.InternalApi
import akka.stream.actor.ActorPublisher import akka.stream.actor.ActorPublisher
import akka.stream.impl.Stages.DefaultAttributes import akka.stream.impl.Stages.DefaultAttributes
import akka.stream.impl.fusing.GraphStages import akka.stream.impl.fusing.GraphStages
@ -222,10 +222,6 @@ final class Source[+Out, +Mat](
combineRest(2, rest.iterator) combineRest(2, rest.iterator)
}) })
/**
* API MAY CHANGE
*/
@ApiMayChange
def asSourceWithContext[Ctx](f: Out => Ctx): SourceWithContext[Out, Ctx, Mat] = def asSourceWithContext[Ctx](f: Out => Ctx): SourceWithContext[Out, Ctx, Mat] =
new SourceWithContext(this.map(e => (e, f(e)))) new SourceWithContext(this.map(e => (e, f(e))))
} }