Created
March 19, 2019 17:50
-
-
Save khajavi/b1d74b476eb2f1e80f9629e809098597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Represents a mode that decides how to deal exceed rate for Throttle operator | |
*/ | |
sealed abstract class ThrottleMode | |
object ThrottleMode { | |
/** | |
* Tells throttle to make pauses before emitting messages to meet throttle rate | |
*/ | |
case object Shaping extends ThrottleMode | |
/** | |
* Makes throttle fail with exception when upstream is faster than throttle rate | |
*/ | |
case object Enforcing extends ThrottleMode | |
/** | |
* Java API: Tells throttle to make pauses before emitting messages to meet throttle rate | |
*/ | |
def shaping = Shaping | |
/** | |
* Java API: Makes throttle fail with exception when upstream is faster than throttle rate | |
*/ | |
def enforcing = Enforcing | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment