akka-stream compiling on Scala 3 (#30324)
Changes: * Private constructor for case class means private apply in Scala 3 * Logger class with Any instead of wildcard where needed * Explicit import of internal implicit conversion import SinkToCompletionStage * Hopefully source and binary compatible Scala 3 signature for GraphApply.create methods * ZipLatestWith leaking private type * Auto apply-to-lambda made explicit * Internal async callback event class covariant * Hub leaking private type * Remove cycles in stream Buffer classes * Avoid cyclic import in ResizableMultiReaderRingBuffer * Safe cast of Subscribers * Explicit import of internal implicit conversion SourceToCompletionStage * Ambigous field name and method * recover delegates using PF from javadsl not inferred, made explicit * TcpStage completing promise with wrong type * Collect aggregator empty value cannot be underscore with type ascription * Some type alias shenanigans in QueueSink removed * Explicit type on effectiveMaximumBurst in Throttle * Override method return type not inferred in GraphInterpreter * MutableCollectorState.accumulated getter got wrong type somehow * TLS actor fallback case only applicable to null * Some internal unchecked pattern matching removed * Ok that createGraph is not present in Java API * Separate impl per language for implicit actor system apply
This commit is contained in:
parent
7f3bfb1a30
commit
3a3e643e07
39 changed files with 259 additions and 103 deletions
|
|
@ -40,7 +40,7 @@ import akka.util.NanoTimeTokenBucket
|
|||
private val nanosBetweenTokens = per.toNanos / cost
|
||||
// 100 ms is a realistic minimum between tokens, otherwise the maximumBurst is adjusted
|
||||
// to be able to support higher rates
|
||||
val effectiveMaximumBurst =
|
||||
val effectiveMaximumBurst: Long =
|
||||
if (maximumBurst == Throttle.AutomaticMaximumBurst) math.max(1, ((100 * 1000 * 1000) / nanosBetweenTokens))
|
||||
else maximumBurst
|
||||
require(!(mode == ThrottleMode.Enforcing && effectiveMaximumBurst < 0), "maximumBurst must be > 0 in Enforcing mode")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue