org.opennms.core.utils
Class PropertiesCache
java.lang.Object
org.opennms.core.utils.PropertiesCache
public class PropertiesCache
- extends java.lang.Object
Caches properties files in order to improve performance.
- Author:
- brozow
|
Method Summary |
void |
clear()
|
java.util.Properties |
findProperties(java.io.File propFile)
|
java.util.Properties |
getProperties(java.io.File propFile)
Get the current properties object from the cache loading it in memory |
java.lang.String |
getProperty(java.io.File propFile,
java.lang.String key)
|
void |
saveProperties(java.io.File propFile,
java.util.Properties properties)
|
void |
setProperty(java.io.File propFile,
java.lang.String key,
java.lang.String value)
|
void |
updateProperties(java.io.File propFile,
java.util.Map<java.lang.String,java.lang.String> props)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertiesCache
public PropertiesCache()
clear
public void clear()
getProperties
public java.util.Properties getProperties(java.io.File propFile)
throws java.io.IOException
- Get the current properties object from the cache loading it in memory
- Parameters:
propFile -
- Returns:
-
- Throws:
java.io.IOException
findProperties
public java.util.Properties findProperties(java.io.File propFile)
throws java.io.IOException
- Throws:
java.io.IOException
saveProperties
public void saveProperties(java.io.File propFile,
java.util.Properties properties)
throws java.io.IOException
- Throws:
java.io.IOException
updateProperties
public void updateProperties(java.io.File propFile,
java.util.Map<java.lang.String,java.lang.String> props)
throws java.io.IOException
- Throws:
java.io.IOException
setProperty
public void setProperty(java.io.File propFile,
java.lang.String key,
java.lang.String value)
throws java.io.IOException
- Throws:
java.io.IOException
getProperty
public java.lang.String getProperty(java.io.File propFile,
java.lang.String key)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2007. All Rights Reserved.