public abstract class PollingRemoteConfigurationSource extends Object implements RemoteConfigurationSource
Constructor and Description |
---|
PollingRemoteConfigurationSource(long refreshIntervalMs) |
Modifier and Type | Method and Description |
---|---|
io.confluent.telemetry.config.remote.v1.RemoteConfiguration |
getConfig()
Returns the latest received configuration from this source.
|
protected abstract Optional<io.confluent.telemetry.config.remote.RemoteConfigurationResponse> |
requestConfig() |
void |
setConfigurationChangeCallback(Consumer<io.confluent.telemetry.config.remote.v1.RemoteConfiguration> callback)
Only one callback can be registered.
|
void |
start() |
void |
stop() |
public PollingRemoteConfigurationSource(long refreshIntervalMs)
public io.confluent.telemetry.config.remote.v1.RemoteConfiguration getConfig()
RemoteConfigurationSource
getConfig
in interface RemoteConfigurationSource
public void setConfigurationChangeCallback(Consumer<io.confluent.telemetry.config.remote.v1.RemoteConfiguration> callback)
setConfigurationChangeCallback
in interface RemoteConfigurationSource
public void stop()
stop
in interface RemoteConfigurationSource
public void start()
start
in interface RemoteConfigurationSource
protected abstract Optional<io.confluent.telemetry.config.remote.RemoteConfigurationResponse> requestConfig()