java.lang.AutoCloseable
, java.io.Closeable
, Configurable
FileConfigProvider
public interface ConfigProvider extends Configurable, java.io.Closeable
Modifier and Type | Method | Description |
---|---|---|
ConfigData |
get(java.lang.String path) |
Retrieves the data at the given path.
|
ConfigData |
get(java.lang.String path,
java.util.Set<java.lang.String> keys) |
Retrieves the data with the given keys at the given path.
|
default void |
subscribe(java.lang.String path,
java.util.Set<java.lang.String> keys,
ConfigChangeCallback callback) |
Subscribes to changes for the given keys at the given path (optional operation).
|
default void |
unsubscribe(java.lang.String path,
java.util.Set<java.lang.String> keys,
ConfigChangeCallback callback) |
Unsubscribes to changes for the given keys at the given path (optional operation).
|
default void |
unsubscribeAll() |
Clears all subscribers (optional operation).
|
configure
ConfigData get(java.lang.String path)
path
- the path where the data residesConfigData get(java.lang.String path, java.util.Set<java.lang.String> keys)
path
- the path where the data resideskeys
- the keys whose values will be retrieveddefault void subscribe(java.lang.String path, java.util.Set<java.lang.String> keys, ConfigChangeCallback callback)
path
- the path where the data resideskeys
- the keys whose values will be retrievedcallback
- the callback to invoke upon changedefault void unsubscribe(java.lang.String path, java.util.Set<java.lang.String> keys, ConfigChangeCallback callback)
path
- the path where the data resideskeys
- the keys whose values will be retrievedcallback
- the callback to be unsubscribed from changesdefault void unsubscribeAll()