1 /*
2  * Copyright 2010-2011 the original author or authors.
3  *
4  * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 
17 package org.springframework.cache.config;
18 
19 /**
20  * Basic service interface.
21  *
22  * @author Costin Leau
23  */
24 public interface CacheableService<T> {
25 
cache(Object arg1)26 	T cache(Object arg1);
27 
invalidate(Object arg1)28 	void invalidate(Object arg1);
29 
evictEarly(Object arg1)30 	void evictEarly(Object arg1);
31 
evictAll(Object arg1)32 	void evictAll(Object arg1);
33 
evictWithException(Object arg1)34 	void evictWithException(Object arg1);
35 
evict(Object arg1, Object arg2)36 	void evict(Object arg1, Object arg2);
37 
invalidateEarly(Object arg1, Object arg2)38 	void invalidateEarly(Object arg1, Object arg2);
39 
conditional(int field)40 	T conditional(int field);
41 
key(Object arg1, Object arg2)42 	T key(Object arg1, Object arg2);
43 
name(Object arg1)44 	T name(Object arg1);
45 
nullValue(Object arg1)46 	T nullValue(Object arg1);
47 
update(Object arg1)48 	T update(Object arg1);
49 
conditionalUpdate(Object arg2)50 	T conditionalUpdate(Object arg2);
51 
nullInvocations()52 	Number nullInvocations();
53 
rootVars(Object arg1)54 	T rootVars(Object arg1);
55 
throwChecked(Object arg1)56 	T throwChecked(Object arg1) throws Exception;
57 
throwUnchecked(Object arg1)58 	T throwUnchecked(Object arg1);
59 
60 	// multi annotations
multiCache(Object arg1)61 	T multiCache(Object arg1);
62 
multiEvict(Object arg1)63 	T multiEvict(Object arg1);
64 
multiCacheAndEvict(Object arg1)65 	T multiCacheAndEvict(Object arg1);
66 
multiConditionalCacheAndEvict(Object arg1)67 	T multiConditionalCacheAndEvict(Object arg1);
68 
multiUpdate(Object arg1)69 	T multiUpdate(Object arg1);
70 }