public class AbstractPropertyFileHandler extends Object
Modifier and Type | Field and Description |
---|---|
private Properties |
cache |
private ReentrantReadWriteLock |
lock |
private static org.slf4j.Logger |
LOG |
private File |
propertiesFile |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPropertyFileHandler(String name) |
Modifier and Type | Method and Description |
---|---|
private static Properties |
copyOf(Properties p) |
boolean |
delete() |
void |
delete(String m) |
boolean |
exists() |
String |
get(String m) |
Properties |
getAll() |
File |
getFile(boolean create) |
String |
getPath() |
private Properties |
load() |
private void |
save(Properties p) |
void |
save(String m,
String value) |
void |
saveAll(Properties properties) |
private static final org.slf4j.Logger LOG
private final File propertiesFile
private final ReentrantReadWriteLock lock
private Properties cache
protected AbstractPropertyFileHandler(String name)
public File getFile(boolean create) throws IOException
IOException
private Properties load() throws IOException
IOException
private void save(Properties p) throws IOException
IOException
public String get(String m) throws ConfigurationException
ConfigurationException
public void delete(String m) throws ConfigurationException
ConfigurationException
public void save(String m, String value) throws ConfigurationException
ConfigurationException
public void saveAll(Properties properties) throws ConfigurationException
ConfigurationException
public Properties getAll() throws ConfigurationException
ConfigurationException
private static Properties copyOf(Properties p)
public String getPath()
public boolean exists()
public boolean delete()
Copyright © 2012-2014 52north.org. All Rights Reserved.