public class CachingConfigurationBackend extends Object implements ConfigurationBackend
| Constructor and Description |
|---|
CachingConfigurationBackend(ConfigurationBackend realConfigurationBackend)
Creates a new caching configuration backend that works as a proxy for the
specified configuration backend and caches all values it retrieves.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the current cache, causing the all further lookups to be repeated.
|
String |
getValue(String attribute)
Returns the value of the given attribute from the backend.
|
void |
putValue(String attribute,
String value)
Sets the value of the given attribute within the backend.
|
void |
save()
Saves the configuration.
|
public CachingConfigurationBackend(ConfigurationBackend realConfigurationBackend)
realConfigurationBackend - The configuration backend to proxypublic String getValue(String attribute) throws ConfigurationException
getValue in interface ConfigurationBackendattribute - The name of the attributeConfigurationException - if the attribute could not be foundConfigurationBackend.getValue(java.lang.String)public void putValue(String attribute, String value) throws ConfigurationException
putValue in interface ConfigurationBackendattribute - The name of the attribute to setvalue - The string representation of the valueConfigurationException - if the value could not be setConfigurationBackend.putValue(java.lang.String,
java.lang.String)public void save()
throws ConfigurationException
save in interface ConfigurationBackendConfigurationException - if the configuration could not be savedpublic void clear()
Copyright © 2026. All rights reserved.