public interface ConfigProvider extends Configurable, java.io.Closeable
Modifier and Type | Method and 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 change{@link
- UnsupportedOperationException} if the subscribe operation is not supporteddefault 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 changes{@link
- UnsupportedOperationException} if the unsubscribe operation is not supporteddefault void unsubscribeAll()
{@link
- UnsupportedOperationException} if the unsubscribeAll operation is not supported