public interface ElasticConfigStore extends Store<ElasticConfigEvent,ElasticConfigStoreDelegate>
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
addNode(ConfigStoreType store,
ConfigNodePath path,
ConfigNode node)
Adds a new node to the ElasticConfigStore.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
createRecursive(ConfigStoreType store,
ConfigNodePath path,
ConfigNode node)
Creates nodes in the ElasticConfigStore, recursively by creating
all missing intermediate nodes in the path.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
deleteRecursive(ConfigStoreType store,
ConfigNodePath path)
Delete nodes in the ElasticConfigStore, recursively by deleting all
intermediate nodes in the path.
|
java.util.concurrent.CompletableFuture<ConfigNode> |
getNode(ConfigStoreType store,
ConfigNodePath path,
TraversalMode mode,
ConfigFilter filter)
Returns a value node or subtree under the given path.
|
java.util.concurrent.CompletableFuture<java.lang.Integer> |
getNumberOfChildren(ConfigStoreType store,
ConfigNodePath path,
ConfigFilter filter)
Returns the number of children under the given path, excluding
the node at the path.
|
java.util.concurrent.CompletableFuture<ConfigNode> |
removeNode(ConfigStoreType store,
ConfigNodePath path)
Removes a node from the ElasticConfigStore.
|
java.util.concurrent.CompletableFuture<ConfigNode> |
updateNode(ConfigStoreType store,
ConfigNodePath path,
ConfigNode node)
Creates/Updates a node in the ElasticConfigStore.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
updateRecursive(ConfigStoreType store,
ConfigNodePath path,
ConfigNode node)
Creates/Updates nodes in the ElasticConfigStore, recursively by creating
all missing intermediate nodes in the path.
|
hasDelegate, setDelegate, unsetDelegate
java.util.concurrent.CompletableFuture<java.lang.Boolean> addNode(ConfigStoreType store, ConfigNodePath path, ConfigNode node)
store
- type of store to which the application wants to add the node to.path
- data structure with absolute path to the parent and relative
path to the nodenode
- data structure with nodetype and value to be stored at the nodetrue
if the new node was successfully
added. Future will be completed with false
if a node already exists at
the specified path. Future will be completed exceptionally with a
FailedException
if the parent node (for the node to create) does not exist.java.util.concurrent.CompletableFuture<ConfigNode> removeNode(ConfigStoreType store, ConfigNodePath path)
store
- type of store which the application wants to access.path
- data structure with absolute path to the parent and
relative path to the nodeFailedException
if the node to be removed is either the root
node or has one or more children or if the node to be removed does not exist.java.util.concurrent.CompletableFuture<ConfigNode> updateNode(ConfigStoreType store, ConfigNodePath path, ConfigNode node)
store
- type of store which the application wants to access.path
- data structure with absolute path to the parent and
relative path to the nodenode
- data structure with nodetype and new value to be stored at the nodenull
if there was no node previously at that path.
Future will be completed with a FailedException
if the parent node (for the node to create/update) does not exist.java.util.concurrent.CompletableFuture<java.lang.Boolean> createRecursive(ConfigStoreType store, ConfigNodePath path, ConfigNode node)
store
- type of store which the application wants to access.path
- data structure with absolute path to the parent and relative
path to the nodenode
- recursive data structure with nodetype and value to
be stored at the nodetrue
if all the new
nodes were successfully
created. Future will be completed with false
if any node
already exists at the specified path
//TODOjava.util.concurrent.CompletableFuture<java.lang.Boolean> deleteRecursive(ConfigStoreType store, ConfigNodePath path)
store
- type of store which the appplication wants to access.path
- data structure with absolute path to the parent and
relative path to the nodetrue
if all the
nodes under the given path including the node at the path could
be successfully deleted. Future will be completed with false
if the node at the given path or any parent node
did not exist //TODOjava.util.concurrent.CompletableFuture<java.lang.Boolean> updateRecursive(ConfigStoreType store, ConfigNodePath path, ConfigNode node)
store
- type of store which the appplication wants to access.path
- data structure with absolute path to the parent and
relative path to the nodenode
- recursive data structure with nodetype and value to
be stored at the nodetrue
if all the
nodes under the given path
including the node at the path could be successfully updated.
Future will be completed with false
if the node at the
given path or any parent node
did not exist //TODOjava.util.concurrent.CompletableFuture<ConfigNode> getNode(ConfigStoreType store, ConfigNodePath path, TraversalMode mode, ConfigFilter filter)
store
- type of store which the appplication wants to access.path
- data structure with absolute path to the parent and
relative path to the nodemode
- wether to retrive the nodes recursivley or notfilter
- filtering conditions to be applied on the result
list of nodes.null
if
after applying the filter, the result is an empty list of nodes.
Future will be completed with a FailedException
if path
does not point to a valid node.java.util.concurrent.CompletableFuture<java.lang.Integer> getNumberOfChildren(ConfigStoreType store, ConfigNodePath path, ConfigFilter filter)
store
- type of store which the appplication wants to access.path
- data structure with absolute path to the parent and
relative path to the nodefilter
- how the value nodes should be filteredInteger
, the
count of the children
after applying the filtering conditions as well.
Future will be completed with a FailedException
if path
does not point to a valid node