Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CacheManagerRegistry |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.core.api.cache; | |
17 | ||
18 | import org.springframework.cache.CacheManager; | |
19 | ||
20 | import java.util.List; | |
21 | ||
22 | /** | |
23 | * | |
24 | */ | |
25 | public interface CacheManagerRegistry { | |
26 | /** | |
27 | * Will return a list of registered cache managers. Will not return null. | |
28 | * @return a list of cache managers | |
29 | */ | |
30 | List<CacheManager> getCacheManagers(); | |
31 | ||
32 | /** | |
33 | * Gets a cache manager for a given name. Name cannot be null or blank. | |
34 | * | |
35 | * @param name the cache manager name | |
36 | * @return the CacheManager | |
37 | * @throws IllegalArgumentException if the name is null or blank | |
38 | */ | |
39 | CacheManager getCacheManager(String name); | |
40 | ||
41 | /** | |
42 | * Gets the name of a cache manager. The cm cannot be null. Will not return null or blank string. | |
43 | * | |
44 | * @param cm the cache manager | |
45 | * @return the name | |
46 | * @throws IllegalArgumentException if the cm is null | |
47 | */ | |
48 | String getCacheManagerName(CacheManager cm); | |
49 | ||
50 | /** | |
51 | * Gets a cache manager for a given cache name. Name cannot be null or blank. | |
52 | * | |
53 | * @param cacheName the name of a Cache in a CacheManager. | |
54 | * @return the CacheManager | |
55 | * @throws IllegalArgumentException if the name is null or blank | |
56 | */ | |
57 | CacheManager getCacheManagerByCacheName(String cacheName); | |
58 | } |