Record Class RateLimit
java.lang.Object
java.lang.Record
io.camunda.zeebe.logstreams.impl.flowcontrol.RateLimit
public record RateLimit(boolean enabled, int limit, Duration rampUp, RateLimit.Throttling throttling)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRateLimit(boolean enabled, int limit, Duration rampUp, RateLimit.Throttling throttling) Creates an instance of aRateLimitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RateLimitdisabled()booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlimit()Returns the value of thelimitrecord component.com.google.common.util.concurrent.RateLimiterlimiter()rampUp()Returns the value of therampUprecord component.Returns the value of thethrottlingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RateLimit
Creates an instance of aRateLimitrecord class.- Parameters:
enabled- the value for theenabledrecord componentlimit- the value for thelimitrecord componentrampUp- the value for therampUprecord componentthrottling- the value for thethrottlingrecord component
-
-
Method Details
-
disabled
-
limiter
public com.google.common.util.concurrent.RateLimiter limiter() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
limit
public int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
rampUp
Returns the value of therampUprecord component.- Returns:
- the value of the
rampUprecord component
-
throttling
Returns the value of thethrottlingrecord component.- Returns:
- the value of the
throttlingrecord component
-