public interface Configuration extends BatchRunner
Modifier and Type | Interface and Description |
---|---|
static class |
Configuration.ConfigStorageType |
static class |
Configuration.NodeFactory |
BatchRunner.Batch
Modifier and Type | Field and Description |
---|---|
static String |
CONF_STORAGE_SYSTEM_PROP |
static String |
OLOCK_HASH_KEY
A special property key that indicates that
the containing node is a hash-based optimistic locking root and
that this property contains the hash of this node.
|
static String |
REFERENCE_BY_UUID_PATTERN |
static String |
REFERENCE_KEY
A special property key that indicates that the container of this property is a reference
to a node with uuid that equals to the property's value.
|
static String |
UUID_KEY
A special property key that indicates that this property is the referable uuid of the containing config node
|
static String |
WEAK_REFERENCE_KEY |
Modifier and Type | Method and Description |
---|---|
Object |
getConfigurationNode(Path path,
Class configurableClass)
Loads a configuration node under the specified path.
|
Map<String,Object> |
getConfigurationRoot()
Return the root of the configuration tree.
|
Path |
getPathByUUID(String uuid) |
void |
lock()
Aquire a global pessimistic lock (cluster-aware implementations should ensure that only a single node can aquire the lock at a time)
Subsequent calls from the same transaction should not block.
|
boolean |
nodeExists(Path path)
Tests if a node under the specified path exists.
|
void |
persistNode(Path path,
Map<String,Object> configNode,
Class configurableClass)
Persists the configuration node to the specified path.
|
void |
refreshNode(Path path)
Invalidates any present cached state for the node
It is imperative that some other nodes might also be refreshed during the operation.
|
void |
removeNode(Path path)
Removes a configuration node under the specified path with all its children permanently
|
Iterator |
search(String liteXPathExpression)
Performs a search on the configuration tree and returns an iterator to configuration nodes that satisfy the search criteria.
|
runBatch
static final String CONF_STORAGE_SYSTEM_PROP
static final String UUID_KEY
static final String OLOCK_HASH_KEY
static final String REFERENCE_KEY
ConfigurableProperty.weakReference()
)static final String WEAK_REFERENCE_KEY
static final String REFERENCE_BY_UUID_PATTERN
Map<String,Object> getConfigurationRoot() throws ConfigurationException
ConfigurationException
Object getConfigurationNode(Path path, Class configurableClass) throws ConfigurationException
path
- A reference to a nodeconfigurableClass
- ConfigurationException
boolean nodeExists(Path path) throws ConfigurationException
path
- ConfigurationException
void persistNode(Path path, Map<String,Object> configNode, Class configurableClass) throws ConfigurationException
path
- path to the nodeconfigNode
- configuration node to persistconfigurableClass
- class annotated with ConfigurableClass, ConfigurableProperty annotations that corresponds to this node.ConfigurationException
void refreshNode(Path path) throws ConfigurationException
path
- ConfigurationException
void removeNode(Path path) throws ConfigurationException
path
- ConfigurationException
Path getPathByUUID(String uuid)
Iterator search(String liteXPathExpression) throws IllegalArgumentException, ConfigurationException
liteXPathExpression
- Must be absolute path, no double slashes, no @attributes (only [attr=val] or [attr<>val])IllegalArgumentException
ConfigurationException
void lock()
Copyright © 2017 dcm4che.org. All rights reserved.