Package thredds.server.catalog
Class ConfigCatalogCache
- java.lang.Object
-
- thredds.server.catalog.ConfigCatalogCache
-
- All Implemented Interfaces:
CatalogReader
@Component @DependsOn("TdsContext") public class ConfigCatalogCache extends Object implements CatalogReaderKeep 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)voidinit(String rootPath, int maxSize)voidinvalidateAll()voidput(String catKey, ConfigCatalog cat)static ConfigCatalogreadCatalog(String catalogFullPath)
-
-
-
Constructor Detail
-
ConfigCatalogCache
public ConfigCatalogCache()
-
ConfigCatalogCache
public ConfigCatalogCache(String rootPath, int maxSize)
-
-
Method Detail
-
init
public void init(String rootPath, int maxSize)
-
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
-
-