View Javadoc
1   package com.atlassian.plugin.osgi.container;
2   
3   import java.io.File;
4   
5   /**
6    * Access to persistent cache locations used throughout the OSGi plugin system. Implementations are responsible for
7    * ensuring the directories are not null and do exist.
8    *
9    * @since 2.2.0
10   */
11  public interface OsgiPersistentCache {
12      /**
13       * @return the directory to store extracted framework bundles
14       */
15      File getFrameworkBundleCache();
16  
17      /**
18       * @return the directory to use for the container bundle cache
19       */
20      File getOsgiBundleCache();
21  
22      /**
23       * @return the directory to store transformed plugins
24       */
25      File getTransformedPluginCache();
26  
27      /**
28       * Clear all caches
29       *
30       * @throws OsgiContainerException If the caches couldn't be cleared
31       */
32      void clear() throws OsgiContainerException;
33  
34      /**
35       * Validates the caches against a cache key. If the key changes, the directories are wiped clean.
36       *
37       * @param cacheKey The cache key, can be anything
38       */
39      void validate(String cacheKey);
40  }