public class ReferenceIndexingDecorator extends DelegatingConfiguration
IMPORTANT: Some cache implementations have issues with isolation, so the base impl treats both absence of objects in the cache as well as empty paths the same way - i.e. like that entry does not exist
Configuration.ConfigStorageType, Configuration.NodeFactory
BatchRunner.Batch
Modifier and Type | Field and Description |
---|---|
private static Logger |
log |
(package private) static PathPattern |
referencePattern |
protected Map<String,Path> |
uuidToReferableIndex |
delegate
CONF_STORAGE_SYSTEM_PROP, OLOCK_HASH_KEY, REFERENCE_BY_UUID_PATTERN, REFERENCE_KEY, UUID_KEY, WEAK_REFERENCE_KEY
Constructor and Description |
---|
ReferenceIndexingDecorator() |
ReferenceIndexingDecorator(Configuration delegate,
Map<String,Path> uuidToSimplePathCache) |
Modifier and Type | Method and Description |
---|---|
protected List<DuplicateUUIDException> |
addReferablesToIndex(List<Object> pathItems,
Object configNode) |
protected Object |
getNodeByUUID(Class configurableClass,
String uuid) |
Path |
getPathByUUID(String uuid) |
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.
|
protected void |
removeFromCache(String uuid) |
void |
removeNode(Path path)
Removes a configuration node under the specified path with all its children permanently
|
protected void |
removeOldReferablesFromIndex(Object oldConfigurationNode) |
Iterator |
search(String liteXPathExpression)
Performs a search on the configuration tree and returns an iterator to configuration nodes that satisfy the search criteria.
|
getConfigurationNode, getConfigurationRoot, lock, nodeExists, runBatch
static PathPattern referencePattern
protected Map<String,Path> uuidToReferableIndex
public ReferenceIndexingDecorator()
public ReferenceIndexingDecorator(Configuration delegate, Map<String,Path> uuidToSimplePathCache)
public Path getPathByUUID(String uuid)
getPathByUUID
in interface Configuration
getPathByUUID
in class DelegatingConfiguration
protected void removeOldReferablesFromIndex(Object oldConfigurationNode)
protected List<DuplicateUUIDException> addReferablesToIndex(List<Object> pathItems, Object configNode)
protected Object getNodeByUUID(Class configurableClass, String uuid) throws ConfIndexOutOfSyncException
ConfIndexOutOfSyncException
public void persistNode(Path path, Map<String,Object> configNode, Class configurableClass) throws ConfigurationException
Configuration
persistNode
in interface Configuration
persistNode
in class DelegatingConfiguration
path
- path to the nodeconfigNode
- configuration node to persistconfigurableClass
- class annotated with ConfigurableClass, ConfigurableProperty annotations that corresponds to this node.ConfigurationException
public void refreshNode(Path path) throws ConfigurationException
Configuration
refreshNode
in interface Configuration
refreshNode
in class DelegatingConfiguration
ConfigurationException
public void removeNode(Path path) throws ConfigurationException
Configuration
removeNode
in interface Configuration
removeNode
in class DelegatingConfiguration
ConfigurationException
public Iterator search(String liteXPathExpression) throws IllegalArgumentException, ConfigurationException
Configuration
search
in interface Configuration
search
in class DelegatingConfiguration
liteXPathExpression
- Must be absolute path, no double slashes, no @attributes (only [attr=val] or [attr<>val])IllegalArgumentException
ConfigurationException
protected void removeFromCache(String uuid)
Copyright © 2017 dcm4che.org. All rights reserved.