Interface FlinkConnectorRateLimiter
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
GuavaFlinkConnectorRateLimiter
@PublicEvolving public interface FlinkConnectorRateLimiter extends Serializable
An interface to create a ratelimiterThe ratelimiter is configured via
setRate(long)
and created viaopen(RuntimeContext)
. An example implementation can be foundGuavaFlinkConnectorRateLimiter
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
acquire(int permits)
Acquires permits for the rate limiter.void
close()
long
getRate()
void
open(RuntimeContext runtimeContext)
A method that can be used to create and configure a ratelimiter based on the runtimeContext.void
setRate(long rate)
Sets the desired rate for the rate limiter.
-
-
-
Method Detail
-
open
void open(RuntimeContext runtimeContext)
A method that can be used to create and configure a ratelimiter based on the runtimeContext.- Parameters:
runtimeContext
-
-
setRate
void setRate(long rate)
Sets the desired rate for the rate limiter.- Parameters:
rate
-
-
acquire
void acquire(int permits)
Acquires permits for the rate limiter.
-
getRate
long getRate()
-
close
void close()
-
-