CacheableService.java 1.4 KB
Newer Older
C
Costin Leau 已提交
1
/*
C
Costin Leau 已提交
2
 * Copyright 2010-2011 the original author or authors.
C
Costin Leau 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.cache.config;

/**
 * Basic service interface.
 * 
 * @author Costin Leau
 */
public interface CacheableService<T> {

	T cache(Object arg1);

	void invalidate(Object arg1);

30
	void evict(Object arg1, Object arg2);
C
Costin Leau 已提交
31

C
Costin Leau 已提交
32 33 34 35
	T conditional(int field);

	T key(Object arg1, Object arg2);

C
Costin Leau 已提交
36 37
	T name(Object arg1);

C
Costin Leau 已提交
38 39
	T nullValue(Object arg1);

C
Costin Leau 已提交
40 41 42 43
	T update(Object arg1);

	T conditionalUpdate(Object arg2);

C
Costin Leau 已提交
44 45
	Number nullInvocations();

C
Costin Leau 已提交
46 47
	T rootVars(Object arg1);

C
Costin Leau 已提交
48 49 50 51
	T throwChecked(Object arg1) throws Exception;

	T throwUnchecked(Object arg1);

C
Costin Leau 已提交
52 53 54 55 56 57 58 59 60 61
	// multi annotations
	T multiCache(Object arg1);
	
	T multiEvict(Object arg1);

	T multiCacheAndEvict(Object arg1);
	
	T multiConditionalCacheAndEvict(Object arg1);

	T multiUpdate(Object arg1);
C
Costin Leau 已提交
62
}