Renamed single letter parameter (#30150)

* Renamed method parameter (`d` -> `duration`) in akka-actor-typed and akka-stream modules #30115

* Renamed method parameter (`n` -> `maxNumber`) and accordingly adjusted inline scala docs
This commit is contained in:
Seeta Ramayya 2021-03-29 17:31:39 +02:00 committed by GitHub
parent 7394ce408b
commit 99af826546
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 105 additions and 95 deletions

View file

@ -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