* @return A meta data object.
* @throws MetaDataException if an error occurs.
*/
public synchronized MetaData getMetaData(String cacheKey, MetaData meta, String namespaceUri)
throws MetaDataException {
MRUMemoryStore store = getStore();
String key = getCacheKey(cacheKey, namespaceUri);
MetaData cachedMeta = null;
if (store.containsKey(key)) {
cachedMeta = (MetaData) store.get(key);
if (meta.getLastModified() > cachedMeta.getLastModified()) {
cachedMeta = null;
}
}
if (cachedMeta == null) {
cachedMeta = new CacheableMetaData(meta);
store.hold(key, cachedMeta);
}
return cachedMeta;
}