public class ConfigAgent extends Object implements com.yahoo.config.subscription.ConfigSubscriber.SingleSubscriber<MessagebusConfig>
ConfigHandler
interface.Constructor and Description |
---|
ConfigAgent(com.yahoo.config.subscription.ConfigURI configURI,
ConfigHandler handler)
Create a config agent that will obtain config for the given handler and configure it programmatically.
|
ConfigAgent(MessagebusConfig config,
ConfigHandler handler)
Create a config agent that will configure the given handler with the given config.
|
ConfigAgent(String configId,
ConfigHandler handler)
Create a config agent that will obtain config for the given handler and configure it programmatically.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(MessagebusConfig config) |
void |
reload(long generation)
Force reload config.
|
void |
shutdown()
Shuts down the config agent by unsubscribing to the messagebus config.
|
void |
subscribe()
Start listening for config updates.
|
public ConfigAgent(String configId, ConfigHandler handler)
configId
- the config id we want to usehandler
- the handler that should be configuredpublic ConfigAgent(com.yahoo.config.subscription.ConfigURI configURI, ConfigHandler handler)
configURI
- the config URI we want to usehandler
- the handler that should be configuredpublic ConfigAgent(MessagebusConfig config, ConfigHandler handler)
config
- the config we want to usehandler
- the handler that should be configuredpublic void reload(long generation)
public void subscribe()
public void configure(MessagebusConfig config)
configure
in interface com.yahoo.config.subscription.ConfigSubscriber.SingleSubscriber<MessagebusConfig>
public void shutdown()
Copyright © 2018. All rights reserved.