org.springframework.cache.interceptor
Class CompositeCacheOperationSource

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

public class CompositeCacheOperationSource
extends java.lang.Object
implements CacheOperationSource, java.io.Serializable

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

Since:
3.1
Author:
Costin Leau
See Also:
Serialized Form

Field Summary
private  CacheOperationSource[] cacheOperationSources
           
 
Constructor Summary
CompositeCacheOperationSource(CacheOperationSource... cacheOperationSources)
          Create a new CompositeCacheOperationSource for the given sources.
 
Method Summary
 java.util.Collection<CacheOperation> getCacheOperations(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
          Return the collection of cache operations for this method, or null if the method contains no "cacheable" annotations.
 CacheOperationSource[] getCacheOperationSources()
          Return the CacheOperationSource instances that this CompositeCacheOperationSource combines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheOperationSources

private final CacheOperationSource[] cacheOperationSources
Constructor Detail

CompositeCacheOperationSource

public CompositeCacheOperationSource(CacheOperationSource... cacheOperationSources)
Create a new CompositeCacheOperationSource for the given sources.

Parameters:
cacheOperationSources - the CacheOperationSource instances to combine
Method Detail

getCacheOperationSources

public final CacheOperationSource[] getCacheOperationSources()
Return the CacheOperationSource instances that this CompositeCacheOperationSource combines.


getCacheOperations

public java.util.Collection<CacheOperation> getCacheOperations(java.lang.reflect.Method method,
                                                               java.lang.Class<?> targetClass)
Description copied from interface: CacheOperationSource
Return the collection of cache operations for this method, or null if the method contains no "cacheable" annotations.

Specified by:
getCacheOperations in interface CacheOperationSource
Parameters:
method - the method to introspect
targetClass - the target class (may be null, in which case the declaring class of the method must be used)
Returns:
all cache operations for this method, or null if none found