Class DefaultOsgiPersistentCache
java.lang.Object
com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache
- All Implemented Interfaces:
OsgiPersistentCache
Default implementation of persistent cache. Handles clearing of directories if an upgrade has been detected.
- Since:
- 2.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOsgiPersistentCache(File baseDir) Constructs a cache, using the passed file as the base directory for cache subdirectories -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all cachesvoidValidates the caches against a cache key.
-
Constructor Details
-
DefaultOsgiPersistentCache
Constructs a cache, using the passed file as the base directory for cache subdirectories- Parameters:
baseDir- The base directory
-
-
Method Details
-
getFrameworkBundleCache
- Specified by:
getFrameworkBundleCachein interfaceOsgiPersistentCache- Returns:
- the directory to store extracted framework bundles
-
getOsgiBundleCache
- Specified by:
getOsgiBundleCachein interfaceOsgiPersistentCache- Returns:
- the directory to use for the container bundle cache
-
getTransformedPluginCache
- Specified by:
getTransformedPluginCachein interfaceOsgiPersistentCache- Returns:
- the directory to store transformed plugins
-
clear
public void clear()Description copied from interface:OsgiPersistentCacheClear all caches- Specified by:
clearin interfaceOsgiPersistentCache
-
validate
Description copied from interface:OsgiPersistentCacheValidates the caches against a cache key. If the key changes, the directories are wiped clean.- Specified by:
validatein interfaceOsgiPersistentCache- Parameters:
cacheValidationKey- The cache key, can be anything
-