diff --git a/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala index 59db11c00c..4b6f20b191 100644 --- a/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala +++ b/akka-actor-typed/src/main/scala/akka/actor/typed/internal/ActorContextImpl.scala @@ -191,8 +191,8 @@ import scala.util.Success } } - override def setReceiveTimeout(d: java.time.Duration, msg: T): Unit = - setReceiveTimeout(d.asScala, msg) + override def setReceiveTimeout(duration: java.time.Duration, msg: T): Unit = + setReceiveTimeout(duration.asScala, msg) override def scheduleOnce[U](delay: java.time.Duration, target: ActorRef[U], msg: U): akka.actor.Cancellable = scheduleOnce(delay.asScala, target, msg) diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala index 4712191932..9c8d9b0cc2 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Flow.scala @@ -1234,13 +1234,13 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def groupedWithin(n: Int, d: FiniteDuration): javadsl.Flow[In, java.util.List[Out], Mat] = - new Flow(delegate.groupedWithin(n, d).map(_.asJava)) // TODO optimize to one step + def groupedWithin(maxNumber: Int, duration: FiniteDuration): javadsl.Flow[In, java.util.List[Out], Mat] = + new Flow(delegate.groupedWithin(maxNumber, duration).map(_.asJava)) // TODO optimize to one step /** * Chunk up this stream into groups of elements received within a time window, @@ -1257,12 +1257,12 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") - def groupedWithin(n: Int, d: java.time.Duration): javadsl.Flow[In, java.util.List[Out], Mat] = - groupedWithin(n, d.asScala) + def groupedWithin(maxNumber: Int, duration: java.time.Duration): javadsl.Flow[In, java.util.List[Out], Mat] = + groupedWithin(maxNumber, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -1279,7 +1279,7 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @@ -1287,8 +1287,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: FiniteDuration): javadsl.Flow[In, java.util.List[Out], Mat] = - new Flow(delegate.groupedWeightedWithin(maxWeight, d)(costFn.apply).map(_.asJava)) + duration: FiniteDuration): javadsl.Flow[In, java.util.List[Out], Mat] = + new Flow(delegate.groupedWeightedWithin(maxWeight, duration)(costFn.apply).map(_.asJava)) /** * Chunk up this stream into groups of elements received within a time window, @@ -1305,15 +1305,15 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.Flow[In, java.util.List[Out], Mat] = - groupedWeightedWithin(maxWeight, costFn, d.asScala) + duration: java.time.Duration): javadsl.Flow[In, java.util.List[Out], Mat] = + groupedWeightedWithin(maxWeight, costFn, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -1331,15 +1331,15 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, `maxNumber` must be positive, and `d` must be greater than 0 seconds, + * `maxWeight` must be positive, `maxNumber` must be positive, and `duration` must be greater than 0 seconds, * otherwise IllegalArgumentException is thrown. */ def groupedWeightedWithin( maxWeight: Long, maxNumber: Int, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.Flow[In, java.util.List[Out], Mat] = - new Flow(delegate.groupedWeightedWithin(maxWeight, maxNumber, d.asScala)(costFn.apply).map(_.asJava)) + duration: java.time.Duration): javadsl.Flow[In, java.util.List[Out], Mat] = + new Flow(delegate.groupedWeightedWithin(maxWeight, maxNumber, duration.asScala)(costFn.apply).map(_.asJava)) /** * Shifts elements emission in time by a specified amount. It allows to store elements @@ -1464,8 +1464,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def dropWithin(d: FiniteDuration): javadsl.Flow[In, Out, Mat] = - new Flow(delegate.dropWithin(d)) + def dropWithin(duration: FiniteDuration): javadsl.Flow[In, Out, Mat] = + new Flow(delegate.dropWithin(duration)) /** * Discard the elements received within the given duration at beginning of the stream. @@ -1479,8 +1479,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * '''Cancels when''' downstream cancels */ @nowarn("msg=deprecated") - def dropWithin(d: java.time.Duration): javadsl.Flow[In, Out, Mat] = - dropWithin(d.asScala) + def dropWithin(duration: java.time.Duration): javadsl.Flow[In, Out, Mat] = + dropWithin(duration.asScala) /** * Terminate processing (and cancel the upstream publisher) after predicate @@ -1790,8 +1790,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def takeWithin(d: FiniteDuration): javadsl.Flow[In, Out, Mat] = - new Flow(delegate.takeWithin(d)) + def takeWithin(duration: FiniteDuration): javadsl.Flow[In, Out, Mat] = + new Flow(delegate.takeWithin(duration)) /** * Terminate processing (and cancel the upstream publisher) after the given @@ -1813,8 +1813,8 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr * See also [[Flow.limit]], [[Flow.limitWeighted]] */ @nowarn("msg=deprecated") - def takeWithin(d: java.time.Duration): javadsl.Flow[In, Out, Mat] = - takeWithin(d.asScala) + def takeWithin(duration: java.time.Duration): javadsl.Flow[In, Out, Mat] = + takeWithin(duration.asScala) /** * Allows a faster upstream to progress independently of a slower subscriber by conflating elements into a summary diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala index 6dc8498d61..b03fee8007 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Source.scala @@ -2674,13 +2674,15 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def groupedWithin(n: Int, d: FiniteDuration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = - new Source(delegate.groupedWithin(n, d).map(_.asJava)) // TODO optimize to one step + def groupedWithin( + maxNumber: Int, + duration: FiniteDuration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = + new Source(delegate.groupedWithin(maxNumber, duration).map(_.asJava)) // TODO optimize to one step /** * Chunk up this stream into groups of elements received within a time window, @@ -2697,12 +2699,14 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") - def groupedWithin(n: Int, d: java.time.Duration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = - groupedWithin(n, d.asScala) + def groupedWithin( + maxNumber: Int, + duration: java.time.Duration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = + groupedWithin(maxNumber, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -2719,7 +2723,7 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @@ -2727,8 +2731,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: FiniteDuration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = - new Source(delegate.groupedWeightedWithin(maxWeight, d)(costFn.apply).map(_.asJava)) + duration: FiniteDuration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = + new Source(delegate.groupedWeightedWithin(maxWeight, duration)(costFn.apply).map(_.asJava)) /** * Chunk up this stream into groups of elements received within a time window, @@ -2745,15 +2749,15 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = - groupedWeightedWithin(maxWeight, costFn, d.asScala) + duration: java.time.Duration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = + groupedWeightedWithin(maxWeight, costFn, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -2771,15 +2775,15 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, `maxNumber` must be positive, and `d` must be greater than 0 seconds, + * `maxWeight` must be positive, `maxNumber` must be positive, and `duration` must be greater than 0 seconds, * otherwise IllegalArgumentException is thrown. */ def groupedWeightedWithin( maxWeight: Long, maxNumber: Int, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = - new Source(delegate.groupedWeightedWithin(maxWeight, maxNumber, d.asScala)(costFn.apply).map(_.asJava)) + duration: java.time.Duration): javadsl.Source[java.util.List[Out @uncheckedVariance], Mat] = + new Source(delegate.groupedWeightedWithin(maxWeight, maxNumber, duration.asScala)(costFn.apply).map(_.asJava)) /** * Shifts elements emission in time by a specified amount. It allows to store elements @@ -2904,8 +2908,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def dropWithin(d: FiniteDuration): javadsl.Source[Out, Mat] = - new Source(delegate.dropWithin(d)) + def dropWithin(duration: FiniteDuration): javadsl.Source[Out, Mat] = + new Source(delegate.dropWithin(duration)) /** * Discard the elements received within the given duration at beginning of the stream. @@ -2919,8 +2923,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * '''Cancels when''' downstream cancels */ @nowarn("msg=deprecated") - def dropWithin(d: java.time.Duration): javadsl.Source[Out, Mat] = - dropWithin(d.asScala) + def dropWithin(duration: java.time.Duration): javadsl.Source[Out, Mat] = + dropWithin(duration.asScala) /** * Terminate processing (and cancel the upstream publisher) after predicate @@ -3024,8 +3028,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def takeWithin(d: FiniteDuration): javadsl.Source[Out, Mat] = - new Source(delegate.takeWithin(d)) + def takeWithin(duration: FiniteDuration): javadsl.Source[Out, Mat] = + new Source(delegate.takeWithin(duration)) /** * Terminate processing (and cancel the upstream publisher) after the given @@ -3045,8 +3049,8 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ * '''Cancels when''' downstream cancels or timer fires */ @nowarn("msg=deprecated") - def takeWithin(d: java.time.Duration): javadsl.Source[Out, Mat] = - takeWithin(d.asScala) + def takeWithin(duration: java.time.Duration): javadsl.Source[Out, Mat] = + takeWithin(duration.asScala) /** * Allows a faster upstream to progress independently of a slower subscriber by conflating elements into a summary diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala index 6c07d2fc15..8073ae48f9 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubFlow.scala @@ -671,13 +671,15 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def groupedWithin(n: Int, d: FiniteDuration): SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = - new SubFlow(delegate.groupedWithin(n, d).map(_.asJava)) // TODO optimize to one step + def groupedWithin( + maxNumber: Int, + duration: FiniteDuration): SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = + new SubFlow(delegate.groupedWithin(maxNumber, duration).map(_.asJava)) // TODO optimize to one step /** * Chunk up this stream into groups of elements received within a time window, @@ -694,12 +696,14 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") - def groupedWithin(n: Int, d: java.time.Duration): SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = - groupedWithin(n, d.asScala) + def groupedWithin( + maxNumber: Int, + duration: java.time.Duration): SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = + groupedWithin(maxNumber, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -716,7 +720,7 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @@ -724,8 +728,8 @@ class SubFlow[In, Out, Mat]( def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: FiniteDuration): javadsl.SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = - new SubFlow(delegate.groupedWeightedWithin(maxWeight, d)(costFn.apply).map(_.asJava)) + duration: FiniteDuration): javadsl.SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = + new SubFlow(delegate.groupedWeightedWithin(maxWeight, duration)(costFn.apply).map(_.asJava)) /** * Chunk up this stream into groups of elements received within a time window, @@ -742,15 +746,15 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = - groupedWeightedWithin(maxWeight, costFn, d.asScala) + duration: java.time.Duration): javadsl.SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = + groupedWeightedWithin(maxWeight, costFn, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -768,15 +772,15 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, `maxNumber` must be positive, and `d` must be greater than 0 seconds, + * `maxWeight` must be positive, `maxNumber` must be positive, and `duration` must be greater than 0 seconds, * otherwise IllegalArgumentException is thrown. */ def groupedWeightedWithin( maxWeight: Long, maxNumber: Int, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = - new SubFlow(delegate.groupedWeightedWithin(maxWeight, maxNumber, d.asScala)(costFn.apply).map(_.asJava)) + duration: java.time.Duration): javadsl.SubFlow[In, java.util.List[Out @uncheckedVariance], Mat] = + new SubFlow(delegate.groupedWeightedWithin(maxWeight, maxNumber, duration.asScala)(costFn.apply).map(_.asJava)) /** * Shifts elements emission in time by a specified amount. It allows to store elements @@ -901,8 +905,8 @@ class SubFlow[In, Out, Mat]( */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def dropWithin(d: FiniteDuration): SubFlow[In, Out, Mat] = - new SubFlow(delegate.dropWithin(d)) + def dropWithin(duration: FiniteDuration): SubFlow[In, Out, Mat] = + new SubFlow(delegate.dropWithin(duration)) /** * Discard the elements received within the given duration at beginning of the stream. @@ -916,8 +920,8 @@ class SubFlow[In, Out, Mat]( * '''Cancels when''' downstream cancels */ @nowarn("msg=deprecated") - def dropWithin(d: java.time.Duration): SubFlow[In, Out, Mat] = - dropWithin(d.asScala) + def dropWithin(duration: java.time.Duration): SubFlow[In, Out, Mat] = + dropWithin(duration.asScala) /** * Terminate processing (and cancel the upstream publisher) after predicate @@ -936,7 +940,7 @@ class SubFlow[In, Out, Mat]( * * '''Cancels when''' predicate returned false or downstream cancels */ - def takeWhile(p: function.Predicate[Out]): SubFlow[In, Out, Mat] = takeWhile(p, false) + def takeWhile(p: function.Predicate[Out]): SubFlow[In, Out, Mat] = takeWhile(p, inclusive = false) /** * Terminate processing (and cancel the upstream publisher) after predicate @@ -1136,8 +1140,8 @@ class SubFlow[In, Out, Mat]( */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def takeWithin(d: FiniteDuration): SubFlow[In, Out, Mat] = - new SubFlow(delegate.takeWithin(d)) + def takeWithin(duration: FiniteDuration): SubFlow[In, Out, Mat] = + new SubFlow(delegate.takeWithin(duration)) /** * Terminate processing (and cancel the upstream publisher) after the given @@ -1157,8 +1161,8 @@ class SubFlow[In, Out, Mat]( * '''Cancels when''' downstream cancels or timer fires */ @nowarn("msg=deprecated") - def takeWithin(d: java.time.Duration): SubFlow[In, Out, Mat] = - takeWithin(d.asScala) + def takeWithin(duration: java.time.Duration): SubFlow[In, Out, Mat] = + takeWithin(duration.asScala) /** * Allows a faster upstream to progress independently of a slower subscriber by conflating elements into a summary diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala index 3b2142e2b6..270a8944c7 100755 --- a/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/SubSource.scala @@ -660,13 +660,13 @@ class SubSource[Out, Mat]( * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def groupedWithin(n: Int, d: FiniteDuration): SubSource[java.util.List[Out @uncheckedVariance], Mat] = - new SubSource(delegate.groupedWithin(n, d).map(_.asJava)) // TODO optimize to one step + def groupedWithin(maxNumber: Int, duration: FiniteDuration): SubSource[java.util.List[Out @uncheckedVariance], Mat] = + new SubSource(delegate.groupedWithin(maxNumber, duration).map(_.asJava)) // TODO optimize to one step /** * Chunk up this stream into groups of elements received within a time window, @@ -683,12 +683,14 @@ class SubSource[Out, Mat]( * * '''Cancels when''' downstream completes * - * `n` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxNumber` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") - def groupedWithin(n: Int, d: java.time.Duration): SubSource[java.util.List[Out @uncheckedVariance], Mat] = - groupedWithin(n, d.asScala) + def groupedWithin( + maxNumber: Int, + duration: java.time.Duration): SubSource[java.util.List[Out @uncheckedVariance], Mat] = + groupedWithin(maxNumber, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -705,7 +707,7 @@ class SubSource[Out, Mat]( * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @Deprecated @@ -713,8 +715,8 @@ class SubSource[Out, Mat]( def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: FiniteDuration): javadsl.SubSource[java.util.List[Out @uncheckedVariance], Mat] = - new SubSource(delegate.groupedWeightedWithin(maxWeight, d)(costFn.apply).map(_.asJava)) + duration: FiniteDuration): javadsl.SubSource[java.util.List[Out @uncheckedVariance], Mat] = + new SubSource(delegate.groupedWeightedWithin(maxWeight, duration)(costFn.apply).map(_.asJava)) /** * Chunk up this stream into groups of elements received within a time window, @@ -731,15 +733,15 @@ class SubSource[Out, Mat]( * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, and `d` must be greater than 0 seconds, otherwise + * `maxWeight` must be positive, and `duration` must be greater than 0 seconds, otherwise * IllegalArgumentException is thrown. */ @nowarn("msg=deprecated") def groupedWeightedWithin( maxWeight: Long, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.SubSource[java.util.List[Out @uncheckedVariance], Mat] = - groupedWeightedWithin(maxWeight, costFn, d.asScala) + duration: java.time.Duration): javadsl.SubSource[java.util.List[Out @uncheckedVariance], Mat] = + groupedWeightedWithin(maxWeight, costFn, duration.asScala) /** * Chunk up this stream into groups of elements received within a time window, @@ -757,15 +759,15 @@ class SubSource[Out, Mat]( * * '''Cancels when''' downstream completes * - * `maxWeight` must be positive, `maxNumber` must be positive, and `d` must be greater than 0 seconds, + * `maxWeight` must be positive, `maxNumber` must be positive, and `duration` must be greater than 0 seconds, * otherwise IllegalArgumentException is thrown. */ def groupedWeightedWithin( maxWeight: Long, maxNumber: Int, costFn: function.Function[Out, java.lang.Long], - d: java.time.Duration): javadsl.SubSource[java.util.List[Out @uncheckedVariance], Mat] = - new SubSource(delegate.groupedWeightedWithin(maxWeight, maxNumber, d.asScala)(costFn.apply).map(_.asJava)) + duration: java.time.Duration): javadsl.SubSource[java.util.List[Out @uncheckedVariance], Mat] = + new SubSource(delegate.groupedWeightedWithin(maxWeight, maxNumber, duration.asScala)(costFn.apply).map(_.asJava)) /** * Discard the given number of elements at the beginning of the stream. @@ -795,8 +797,8 @@ class SubSource[Out, Mat]( */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def dropWithin(d: FiniteDuration): SubSource[Out, Mat] = - new SubSource(delegate.dropWithin(d)) + def dropWithin(duration: FiniteDuration): SubSource[Out, Mat] = + new SubSource(delegate.dropWithin(duration)) /** * Discard the elements received within the given duration at beginning of the stream. @@ -810,8 +812,8 @@ class SubSource[Out, Mat]( * '''Cancels when''' downstream cancels */ @nowarn("msg=deprecated") - def dropWithin(d: java.time.Duration): SubSource[Out, Mat] = - dropWithin(d.asScala) + def dropWithin(duration: java.time.Duration): SubSource[Out, Mat] = + dropWithin(duration.asScala) /** * Terminate processing (and cancel the upstream publisher) after predicate @@ -1116,8 +1118,8 @@ class SubSource[Out, Mat]( */ @Deprecated @deprecated("Use the overloaded one which accepts java.time.Duration instead.", since = "2.5.12") - def takeWithin(d: FiniteDuration): SubSource[Out, Mat] = - new SubSource(delegate.takeWithin(d)) + def takeWithin(duration: FiniteDuration): SubSource[Out, Mat] = + new SubSource(delegate.takeWithin(duration)) /** * Terminate processing (and cancel the upstream publisher) after the given @@ -1137,8 +1139,8 @@ class SubSource[Out, Mat]( * '''Cancels when''' downstream cancels or timer fires */ @nowarn("msg=deprecated") - def takeWithin(d: java.time.Duration): SubSource[Out, Mat] = - takeWithin(d.asScala) + def takeWithin(duration: java.time.Duration): SubSource[Out, Mat] = + takeWithin(duration.asScala) /** * Allows a faster upstream to progress independently of a slower subscriber by conflating elements into a summary