public abstract class ConfigurationCache<C,T> extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
ConfigurationCache.CacheEntry<T> |
Modifier and Type | Field and Description |
---|---|
private HashMap<String,ConfigurationCache.CacheEntry<T>> |
cache |
private C |
conf |
private long |
staleTimeout |
Constructor and Description |
---|
ConfigurationCache(C conf) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
protected abstract T |
find(C conf,
String key) |
T |
get(String key) |
int |
getStaleTimeout() |
void |
setStaleTimeout(int staleTimeout) |
private final HashMap<String,ConfigurationCache.CacheEntry<T>> cache
private long staleTimeout
public ConfigurationCache(C conf)
public int getStaleTimeout()
public void setStaleTimeout(int staleTimeout)
public void clear()
public T get(String key) throws ConfigurationException
ConfigurationException
protected abstract T find(C conf, String key) throws ConfigurationException
ConfigurationException
Copyright © 2017 dcm4che.org. All rights reserved.