Package org.apache.ivy.core.cache
Class ParserSettingsMonitor
- java.lang.Object
-
- org.apache.ivy.core.cache.ParserSettingsMonitor
-
class ParserSettingsMonitor extends java.lang.ObjectKeep traces of the usage of a ParserSettings in order to check afterwards that the relevant settings didn't changed.A ParserSettingsMonitor provide a ParserSettings that must be used in place of the original one.
The current implementation consider that a settings changed iff one of the used variable has changed.
-
-
Field Summary
Fields Modifier and Type Field Description private ParserSettingsdelegatedSettingsprivate ParserSettingsmonitoredSettingsprivate java.util.Map<java.lang.String,java.lang.String>substitutes
-
Constructor Summary
Constructors Constructor Description ParserSettingsMonitor(ParserSettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendMonitoring()Free the resource used during the monitoring, keeping only the info required to evaluate hasChanged.ParserSettingsgetMonitoredSettings()booleanhasChanged(ParserSettings newSettings)Check if the newSettings is compatible with the original settings that has been monitored.
-
-
-
Field Detail
-
delegatedSettings
private ParserSettings delegatedSettings
-
substitutes
private final java.util.Map<java.lang.String,java.lang.String> substitutes
-
monitoredSettings
private ParserSettings monitoredSettings
-
-
Constructor Detail
-
ParserSettingsMonitor
public ParserSettingsMonitor(ParserSettings settings)
-
-
Method Detail
-
getMonitoredSettings
public ParserSettings getMonitoredSettings()
- Returns:
- The parser settings that must be used in place of the original settings The returned object delegates all the call to the original settings.
-
endMonitoring
public void endMonitoring()
Free the resource used during the monitoring, keeping only the info required to evaluate hasChanged.
-
hasChanged
public boolean hasChanged(ParserSettings newSettings)
Check if the newSettings is compatible with the original settings that has been monitored. Only the info that was actually used is compared.
-
-