Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » base » [javadoc | source]
com.opensymphony.oscache.base
public class: Config [javadoc | source]
java.lang.Object
   com.opensymphony.oscache.base.Config

All Implemented Interfaces:
    Serializable

Responsible for holding the Cache configuration properties. If the default constructor is used, this class will load the properties from the cache.configuration.
Constructor:
 public Config() 
 public Config(Properties p) 
    Create an OSCache configuration with the specified properties. Note that it is the responsibility of the caller to provide valid properties as no error checking is done to ensure that required keys are present. If you're unsure of what keys should be present, have a look at a sample oscache.properties file.
    Parameters:
    p - The properties to use for this configuration. If null, then the default properties are loaded from the oscache.properties file.
Method from com.opensymphony.oscache.base.Config Summary:
get,   getProperties,   getProperty,   loadProperties,   loadProperties,   set
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.base.Config Detail:
 public Object get(Object key) 
 public Properties getProperties() 
    Retrieves all of the configuration properties. This property set should be treated as immutable.
 public String getProperty(String key) 
    Retrieve the value of the named configuration property. If the property cannot be found this method will return null.
 public static Properties loadProperties(URL url,
    String info) 
    Load the properties from the specified URL.
 public static Properties loadProperties(String filename,
    String info) 
    Load the specified properties file from the classpath. If the file cannot be found or loaded, an error will be logged and no properties will be set.
 public  void set(Object key,
    Object value) 
    Sets a configuration property.