public class DelegatingConfiguration extends Object implements Configuration
Configuration.ConfigStorageType, Configuration.NodeFactoryBatchRunner.Batch| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
delegate |
CONF_STORAGE_SYSTEM_PROP, OLOCK_HASH_KEY, REFERENCE_BY_UUID_PATTERN, REFERENCE_KEY, UUID_KEY, WEAK_REFERENCE_KEY| Constructor and Description |
|---|
DelegatingConfiguration() |
DelegatingConfiguration(Configuration delegate) |
| 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
|
void |
runBatch(BatchRunner.Batch batch)
Provides support for batching configuration changes.
|
Iterator |
search(String liteXPathExpression)
Performs a search on the configuration tree and returns an iterator to configuration nodes that satisfy the search criteria.
|
protected Configuration delegate
public DelegatingConfiguration()
public DelegatingConfiguration(Configuration delegate)
public Map<String,Object> getConfigurationRoot() throws ConfigurationException
ConfigurationgetConfigurationRoot in interface ConfigurationConfigurationExceptionpublic Object getConfigurationNode(Path path, Class configurableClass) throws ConfigurationException
ConfigurationgetConfigurationNode in interface Configurationpath - A reference to a nodeConfigurationExceptionpublic boolean nodeExists(Path path) throws ConfigurationException
ConfigurationnodeExists in interface ConfigurationConfigurationExceptionpublic void persistNode(Path path, Map<String,Object> configNode, Class configurableClass) throws ConfigurationException
ConfigurationpersistNode in interface Configurationpath - path to the nodeconfigNode - configuration node to persistconfigurableClass - class annotated with ConfigurableClass, ConfigurableProperty annotations that corresponds to this node.ConfigurationExceptionpublic void refreshNode(Path path) throws ConfigurationException
ConfigurationrefreshNode in interface ConfigurationConfigurationExceptionpublic void removeNode(Path path) throws ConfigurationException
ConfigurationremoveNode in interface ConfigurationConfigurationExceptionpublic Path getPathByUUID(String uuid)
getPathByUUID in interface Configurationpublic Iterator search(String liteXPathExpression) throws IllegalArgumentException, ConfigurationException
Configurationsearch in interface ConfigurationliteXPathExpression - Must be absolute path, no double slashes, no @attributes (only [attr=val] or [attr<>val])IllegalArgumentExceptionConfigurationExceptionpublic void lock()
Configurationlock in interface Configurationpublic void runBatch(BatchRunner.Batch batch)
BatchRunnerrunBatch in interface BatchRunnerbatch - Configuration batch change to executeCopyright © 2017 dcm4che.org. All rights reserved.