Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ICacheManager |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.cache; | |
2 | ||
3 | import net.sf.ehcache.Cache; | |
4 | import org.jtheque.core.managers.ActivableManager; | |
5 | ||
6 | /* | |
7 | * This file is part of JTheque. | |
8 | * | |
9 | * JTheque is free software: you can redistribute it and/or modify | |
10 | * it under the terms of the GNU General Public License as published by | |
11 | * the Free Software Foundation, either version 3 of the License. | |
12 | * | |
13 | * JTheque is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
20 | */ | |
21 | ||
22 | /** | |
23 | * A cache manager specification. | |
24 | * | |
25 | * @author Baptiste Wicht | |
26 | */ | |
27 | public interface ICacheManager extends ActivableManager { | |
28 | /** | |
29 | * Add a cache. | |
30 | * | |
31 | * @param cacheConfiguration The configuration of the cache. | |
32 | */ | |
33 | void addCache(CacheConfiguration cacheConfiguration); | |
34 | ||
35 | /** | |
36 | * Return the cache with the specified name. | |
37 | * | |
38 | * @param name The name of the cache. | |
39 | * @return The cache with the specified name. | |
40 | */ | |
41 | Cache getCache(String name); | |
42 | ||
43 | /** | |
44 | * Indicate if a cache exists with the specified name or not. | |
45 | * | |
46 | * @param name The name of the cache to search for. | |
47 | * @return true if the cache exists else false. | |
48 | */ | |
49 | boolean cacheExists(String name); | |
50 | ||
51 | /** | |
52 | * Remove the cache with the specified name. | |
53 | * | |
54 | * @param name The name of the cache to remove. | |
55 | */ | |
56 | void removeCache(String name); | |
57 | } |