Package thredds.server.catalog
Class ConfigCatalogCache
- java.lang.Object
-
- thredds.server.catalog.ConfigCatalogCache
-
- All Implemented Interfaces:
CatalogReader
@Component public class ConfigCatalogCache extends Object implements CatalogReader
Keep a cache of ConfigCatalog objects. Uses guava com.google.common.cache. If cache miss, call ConfigCatalogBuilder- Since:
- 3/21/2015
-
-
Constructor Summary
Constructors Constructor Description ConfigCatalogCache()ConfigCatalogCache(String rootPath, int maxSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigCatalogget(String catKey)ConfigCataloggetFromAbsolutePath(String catalogFullPath)List<String>getRootCatalogKeys()voidinit(String rootPath, int maxSize, String context)voidinvalidateAll()booleanisRoot(String catName)voidput(String catKey, ConfigCatalog cat)static ConfigCatalogreadCatalog(String catalogFullPath)static ConfigCatalogreadCatalog(String catalogFullPath, String context)voidsetRootCatalogKeys(List<String> rootCatalogKeys)
-
-
-
Constructor Detail
-
ConfigCatalogCache
public ConfigCatalogCache()
-
ConfigCatalogCache
public ConfigCatalogCache(String rootPath, int maxSize)
-
-
Method Detail
-
put
public void put(String catKey, ConfigCatalog cat) throws IOException
- Throws:
IOException
-
invalidateAll
public void invalidateAll()
-
getFromAbsolutePath
public ConfigCatalog getFromAbsolutePath(String catalogFullPath) throws IOException
- Specified by:
getFromAbsolutePathin interfaceCatalogReader- Throws:
IOException
-
get
public ConfigCatalog get(String catKey) throws IOException
- Throws:
IOException
-
readCatalog
public static ConfigCatalog readCatalog(String catalogFullPath) throws IOException
- Throws:
IOException
-
readCatalog
public static ConfigCatalog readCatalog(String catalogFullPath, String context) throws IOException
- Throws:
IOException
-
isRoot
public boolean isRoot(String catName)
-
-