org.springframework.cache.interceptor
Class CompositeCacheOperationSource

java.lang.Object
  extended by org.springframework.cache.interceptor.CompositeCacheOperationSource
All Implemented Interfaces:
Serializable, CacheOperationSource

public class CompositeCacheOperationSource
extends Object
implements CacheOperationSource, Serializable

Composite CacheOperationSource implementation that iterates over a given array of CacheOperationSource instances.

Author:
Costin Leau
See Also:
Serialized Form

Constructor Summary
CompositeCacheOperationSource(CacheOperationSource[] cacheDefinitionSources)
          Create a new CompositeCachingDefinitionSource for the given sources.
 
Method Summary
 CacheOperationSource[] getCacheDefinitionSources()
          Return the CacheDefinitionSource instances that this CompositeCachingDefinitionSource combines.
 CacheOperation getCacheOperation(Method method, Class<?> targetClass)
          Return the cache operation definition for this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeCacheOperationSource

public CompositeCacheOperationSource(CacheOperationSource[] cacheDefinitionSources)
Create a new CompositeCachingDefinitionSource for the given sources.

Parameters:
cacheDefinitionSourcess - the CacheDefinitionSource instances to combine
Method Detail

getCacheDefinitionSources

public final CacheOperationSource[] getCacheDefinitionSources()
Return the CacheDefinitionSource instances that this CompositeCachingDefinitionSource combines.


getCacheOperation

public CacheOperation getCacheOperation(Method method,
                                        Class<?> targetClass)
Description copied from interface: CacheOperationSource
Return the cache operation definition for this method. Return null if the method is not cacheable.

Specified by:
getCacheOperation in interface CacheOperationSource
Parameters:
method - method
targetClass - target class. May be null, in which case the declaring class of the method must be used.
Returns:
CacheOperation the matching cache operation, or null if none found