|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.oscache.base.Config
public class Config
Responsible for holding the Cache configuration properties. If the default
constructor is used, this class will load the properties from the
cache.configuration.
| Field Summary | |
|---|---|
private static Log |
log
|
private Properties |
properties
Properties map to hold the cache configuration. |
private static String |
PROPERTIES_FILENAME
Name of the properties file. |
| Constructor Summary | |
|---|---|
Config()
Create an OSCache Config that loads properties from oscache.properties. |
|
Config(Properties p)
Create an OSCache configuration with the specified properties. |
|
| Method Summary | |
|---|---|
Object |
get(Object key)
|
Properties |
getProperties()
Retrieves all of the configuration properties. |
String |
getProperty(String key)
Retrieve the value of the named configuration property. |
static Properties |
loadProperties(String filename,
String info)
Load the specified properties file from the classpath. |
static Properties |
loadProperties(URL url,
String info)
Load the properties from the specified URL. |
void |
set(Object key,
Object value)
Sets a configuration property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final transient Log log
private static final String PROPERTIES_FILENAME
private Properties properties
| Constructor Detail |
|---|
public Config()
public Config(Properties p)
p - The properties to use for this configuration. If null,
then the default properties are loaded from the oscache.properties
file.| Method Detail |
|---|
public String getProperty(String key)
null.
key - The name of the property.
null if the value could
not be found.
IllegalArgumentException - if the supplied key is null.public Properties getProperties()
public Object get(Object key)
public void set(Object key,
Object value)
key - The unique name for this property.value - The value assigned to this property.
IllegalArgumentException - if the supplied key is null.
public static Properties loadProperties(URL url,
String info)
url - a non null value of the URL to the propertiesinfo - additional logger information if the properties can't be read
public static Properties loadProperties(String filename,
String info)
filename - the properties file with pathinfo - additional logger information if file can't be read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||