|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.common.PropertiesCache
public class PropertiesCache
PropertiesCache caches properties file contents and reloads them if they have been modified.
Constructor Summary | |
---|---|
PropertiesCache()
|
Method Summary | |
---|---|
java.util.Properties |
getProperties(java.io.File file)
Get the java Properties stored in the file, loading from disk only if the file has been modified since the last read, or the cached data has been invalidated. |
boolean |
needsReload(java.io.File file)
Returns true if the file does not exist, or has been modified since the last time it was loaded. |
void |
touch(java.io.File file)
Clear cached data for the file, causing a reload for the next call of getProperties(java.io.File) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesCache()
Method Detail |
---|
public boolean needsReload(java.io.File file) throws java.io.IOException
file
- File to check
java.io.IOException
public java.util.Properties getProperties(java.io.File file) throws java.io.IOException
file
- java properties file
java.io.IOException
- due to file read or find errorpublic void touch(java.io.File file)
getProperties(java.io.File)
file
- file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |