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.NodeFactoryBatchRunner.Batch| Modifier and Type | Field and Description |
|---|---|
private static Logger |
log |
(package private) static PathPattern |
referencePattern |
protected Map<String,Path> |
uuidToReferableIndex |
delegateCONF_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, runBatchstatic 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 ConfigurationgetPathByUUID in class DelegatingConfigurationprotected void removeOldReferablesFromIndex(Object oldConfigurationNode)
protected List<DuplicateUUIDException> addReferablesToIndex(List<Object> pathItems, Object configNode)
protected Object getNodeByUUID(Class configurableClass, String uuid) throws ConfIndexOutOfSyncException
ConfIndexOutOfSyncExceptionpublic void persistNode(Path path, Map<String,Object> configNode, Class configurableClass) throws ConfigurationException
ConfigurationpersistNode in interface ConfigurationpersistNode in class DelegatingConfigurationpath - 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 ConfigurationrefreshNode in class DelegatingConfigurationConfigurationExceptionpublic void removeNode(Path path) throws ConfigurationException
ConfigurationremoveNode in interface ConfigurationremoveNode in class DelegatingConfigurationConfigurationExceptionpublic Iterator search(String liteXPathExpression) throws IllegalArgumentException, ConfigurationException
Configurationsearch in interface Configurationsearch in class DelegatingConfigurationliteXPathExpression - Must be absolute path, no double slashes, no @attributes (only [attr=val] or [attr<>val])IllegalArgumentExceptionConfigurationExceptionprotected void removeFromCache(String uuid)
Copyright © 2017 dcm4che.org. All rights reserved.