com.compoundtheory.objectcache
Class CacheConfig

java.lang.Object
  extended by com.compoundtheory.objectcache.CacheConfig

public class CacheConfig
extends java.lang.Object

The Config querying service, for looking for specific configurations for specific classes

Author:
Mark Mandel

Constructor Summary
CacheConfig()
           
CacheConfig(Config config)
          Constructor that takes the default config
 
Method Summary
 void addConfig(java.lang.String clazz, Config config)
          Add another config to this mechanism for lookup
 Config getConfig(java.lang.String clazz)
          Gets a config for a class, if it can't be found, returns the default one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheConfig

public CacheConfig()

CacheConfig

public CacheConfig(Config config)
Constructor that takes the default config

Parameters:
config -
Method Detail

addConfig

public void addConfig(java.lang.String clazz,
                      Config config)
Add another config to this mechanism for lookup

Parameters:
clazz - the class to apply this config to
config - the Config you want to set

getConfig

public Config getConfig(java.lang.String clazz)
Gets a config for a class, if it can't be found, returns the default one

Parameters:
clazz - The class to look for
Returns:
the Config for the class