@PublicEvolving public interface FlinkConnectorRateLimiter extends Serializable
The ratelimiter is configured via setRate(long)
and
created via open(RuntimeContext)
.
An example implementation can be found GuavaFlinkConnectorRateLimiter
.
Modifier and Type | Method and 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.
|
void open(RuntimeContext runtimeContext)
runtimeContext
- void setRate(long rate)
rate
- void acquire(int permits)
long getRate()
void close()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.