01: package com.completex.objective.components.ocache;
02:
03: /**
04: * Odal Cache Registry
05: *
06: * @author Gennady Krizhevsky
07: */
08: public interface OdalCacheRegistry extends OdalCacheFactory {
09: /**
10: * Registers cache itself if it is instance of OdalKeyedCache ot creates a
11: * OdalKeyedCache decorator for a cache and then registers it.
12: *
13: * @param cache cache to register
14: * already then this parameter is ignored
15: * @throws OdalRuntimeCacheException if cache with the same name already exists
16: */
17: void registerCache(OdalCache cache);
18:
19: /**
20: * Registers cache itself if it is instance of OdalKeyedCache ot creates a
21: * OdalKeyedCache decorator for a cache and then registers it.
22: *
23: * @see OdalCacheConfig
24: * @param cache cache to register
25: * already then this parameter is ignored
26: * @param cacheConfig
27: * @throws OdalRuntimeCacheException if cache with the same name already exists
28: */
29: void registerCache(OdalCache cache, OdalCacheConfig cacheConfig);
30:
31: /**
32: * Registers cache itself if it is instance of OdalKeyedCache ot creates a
33: * OdalKeyedCache decorator for a cache and then registers it.
34: *
35: * @param cache cache to register
36: * @param keyFactory key factory for OdalKeyedCache decorator. If the cache is OdalKeyedCache
37: * already then this parameter is ignored
38: * @throws OdalRuntimeCacheException if cache with the same name already exists
39: */
40: void registerCache(OdalCache cache, OdalKeyFactory keyFactory);
41:
42: /**
43: * Registers cache itself if it is instance of OdalKeyedCache ot creates a
44: * OdalKeyedCache decorator for a cache and then registers it.
45: *
46: * @see OdalCacheConfig
47: * @param cache cache to register
48: * @param keyFactory key factory for OdalKeyedCache decorator. If the cache is OdalKeyedCache
49: * already then this parameter is ignored
50: * @param cacheConfig
51: * @throws OdalRuntimeCacheException if cache with the same name already exists
52: */
53: void registerCache(OdalCache cache, OdalKeyFactory keyFactory,
54: OdalCacheConfig cacheConfig);
55:
56: /**
57: * Unregisters cache
58: *
59: * @param name
60: */
61: void unregisterCache(String name);
62: }
|