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 class
CacheOperation.Builder
Constructor Summary
Constructors Modifier Constructor Description protected
CacheOperation(CacheOperation.Builder b)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
This implementation compares thetoString()
results.String
getCacheManager()
Set<String>
getCacheNames()
Return the cache name(s) associated with the operation.String
getCacheResolver()
String
getCondition()
String
getKey()
String
getKeyGenerator()
String
getName()
int
hashCode()
This implementation returnstoString()
's hash code.String
toString()
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:BasicOperation
Return the cache name(s) associated with the operation.- Specified by:
getCacheNames
in 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:
equals
in classObject
- See Also:
toString()
hashCode
public int hashCode()
This implementation returnstoString()
's hash code.- Overrides:
hashCode
in 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:
toString
in classObject
- See Also:
CacheOperation.Builder.getOperationDescription()