org.opennms.core.utils
Class PropertiesCache

java.lang.Object
  extended by org.opennms.core.utils.PropertiesCache

public class PropertiesCache
extends Object

Caches properties files in order to improve performance.

Author:
Mathew Brozowski

Constructor Summary
PropertiesCache()
           
 
Method Summary
 void clear()
           
 Properties findProperties(File propFile)
           
 Properties getProperties(File propFile)
          Get the current properties object from the cache loading it in memory
 String getProperty(File propFile, String key)
           
 void saveProperties(File propFile, Properties properties)
           
 void setProperty(File propFile, String key, String value)
           
 void updateProperties(File propFile, Map<String,String> props)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesCache

public PropertiesCache()
Method Detail

clear

public void clear()

getProperties

public Properties getProperties(File propFile)
                         throws IOException
Get the current properties object from the cache loading it in memory

Parameters:
propFile -
Returns:
Throws:
IOException

findProperties

public Properties findProperties(File propFile)
                          throws IOException
Throws:
IOException

saveProperties

public void saveProperties(File propFile,
                           Properties properties)
                    throws IOException
Throws:
IOException

updateProperties

public void updateProperties(File propFile,
                             Map<String,String> props)
                      throws IOException
Throws:
IOException

setProperty

public void setProperty(File propFile,
                        String key,
                        String value)
                 throws IOException
Throws:
IOException

getProperty

public String getProperty(File propFile,
                          String key)
                   throws IOException
Throws:
IOException


Copyright © 2009. All Rights Reserved.