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 /**
14 * @return the directory to store extracted framework bundles
15 */
16 File getFrameworkBundleCache();
17
18 /**
19 * @return the directory to use for the container bundle cache
20 */
21 File getOsgiBundleCache();
22
23 /**
24 * @return the directory to store transformed plugins
25 */
26 File getTransformedPluginCache();
27
28 /**
29 * Clear all caches
30 *
31 * @throws OsgiContainerException If the caches couldn't be cleared
32 */
33 void clear() throws OsgiContainerException;
34
35 /**
36 * Validates the caches against a cache key. If the key changes, the directories are wiped clean.
37 *
38 * @param cacheKey The cache key, can be anything
39 */
40 void validate(String cacheKey);
41 }