|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectCache<K,V>
GeneratingCache
ConfigCache
public class ConfigCache
Used to maintain a simple cache of config files, so we don't have to keep loading the same one over and over.
Nested Class Summary | |
---|---|
private static class |
ConfigCache.ConfigCacheKey
A key in the ConfigCache. |
Nested classes/interfaces inherited from class Cache |
---|
Cache.ListEntry, Cache.NullIterator |
Field Summary |
---|
Fields inherited from class Cache |
---|
ageList, keyMap |
Constructor Summary | |
---|---|
ConfigCache()
Default constructor - defines the default cache size and expiration time. |
Method Summary | |
---|---|
IndexerConfig |
find(File configFile,
String indexName)
Find or load the configuration given its File |
protected Object |
generate(Object key)
Load a configuration given its path |
Methods inherited from class GeneratingCache |
---|
addDependency, find |
Methods inherited from class Cache |
---|
cleanup, clear, dependenciesValid, getDependencies, has, lastSet, logAction, remove, size |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigCache()
Method Detail |
---|
public IndexerConfig find(File configFile, String indexName) throws Exception
Exception
protected Object generate(Object key) throws Exception
generate
in class GeneratingCache
key
- The key to generate a value for.
Exception
- If a value cannot be generated for any reason.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |