Class CacheOperation
- java.lang.Object
- org.springframework.cache.interceptor.CacheOperation
- All Implemented Interfaces:
BasicOperation
- Direct Known Subclasses:
CacheableOperation,CacheEvictOperation,CachePutOperation
public abstract class CacheOperation extends Object implements BasicOperation
Base class for cache operations.- Since:
- 3.1
- Author:
- Costin Leau, Stephane Nicoll, Marcin Kamionowski
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCacheOperation.Builder
Constructor Summary
Constructors Modifier Constructor Description protectedCacheOperation(CacheOperation.Builder b)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)This implementation compares thetoString()results.StringgetCacheManager()Set<String>getCacheNames()Return the cache name(s) associated with the operation.StringgetCacheResolver()StringgetCondition()StringgetKey()StringgetKeyGenerator()StringgetName()inthashCode()This implementation returnstoString()'s hash code.StringtoString()Return an identifying description for this cache operation.
Constructor Detail
CacheOperation
protected CacheOperation(CacheOperation.Builder b)
- Since:
- 4.3
Method Detail
getCacheNames
public Set<String> getCacheNames()
Description copied from interface:BasicOperationReturn the cache name(s) associated with the operation.- Specified by:
getCacheNamesin interfaceBasicOperation
getKeyGenerator
public String getKeyGenerator()
getCacheManager
public String getCacheManager()
getCacheResolver
public String getCacheResolver()
getCondition
public String getCondition()
equals
public boolean equals(Object other)
This implementation compares thetoString()results.- Overrides:
equalsin classObject- See Also:
toString()
hashCode
public int hashCode()
This implementation returnstoString()'s hash code.- Overrides:
hashCodein classObject- See Also:
toString()
toString
public final String toString()
Return an identifying description for this cache operation.Returned value is produced by calling
CacheOperation.Builder.getOperationDescription()during object construction. This method is used inhashCode()andequals(java.lang.Object).- Overrides:
toStringin classObject- See Also:
CacheOperation.Builder.getOperationDescription()