public interface IConfigurationStore extends AutoCloseable
On a single node punch system for example, no need to have a kafka. The configuration is simply stored on the local filesystem.
On a clustered punch or on a single node but equipped with Kafka, Kafka is in action.
Modifier and Type | Method and Description |
---|---|
boolean |
checkIfPathExist(String path) |
default void |
close()
Close the client client and any underlying resource.
|
ISettingsMap |
readMap(String path)
Read a Json encoded content from your store.
|
default void |
refresh() |
void |
rmr(String string)
Completely remove a path and all its childs
|
default IConfigurationStore |
startBlocking()
Starts and wait until connected.
|
void |
writeMap(ISettingsMap map,
String path)
Write a map as a Json string the admin database
|
ISettingsMap readMap(String path)
path
- the path of the data you wantvoid writeMap(ISettingsMap map, String path)
map
- your settings mappath
- the path of the data you wantdefault IConfigurationStore startBlocking()
default void close()
close
in interface AutoCloseable
boolean checkIfPathExist(String path)
path
- a configuration node pathvoid rmr(String string)
string
- the path you want to removedefault void refresh() throws TimeoutException
TimeoutException
Copyright © 2014–2023. All rights reserved.