Package akka.stream.javadsl
Class ThrottleControl
- java.lang.Object
-
- akka.stream.javadsl.ThrottleControl
-
public final class ThrottleControl extends java.lang.Object
Control the throttle rate from the outside of the stream, or share a common throttle rate across several streams.
-
-
Constructor Summary
Constructors Constructor Description ThrottleControl(int cost, java.time.Duration per)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCost()
Speed is limited tocost/per
.java.time.Duration
getPer()
Speed is limited tocost/per
.ThrottleMode
mode()
void
update(int cost, java.time.Duration per)
-
-
-
Method Detail
-
getCost
public int getCost()
Speed is limited tocost/per
. This is the current cost.
-
getPer
public java.time.Duration getPer()
Speed is limited tocost/per
. This is the current per duration.
-
mode
public ThrottleMode mode()
-
update
public void update(int cost, java.time.Duration per)
-
-