Top Description Inners Fields Constructors Methods
org.springframework.cache.interceptor

public abstract Class CacheOperation

extends Object
implements BasicOperation
Class Inheritance
All Implemented Interfaces
org.springframework.cache.interceptor.BasicOperation
Known Direct Subclasses
org.springframework.cache.interceptor.CachePutOperation, org.springframework.cache.interceptor.CacheableOperation, org.springframework.cache.interceptor.CacheEvictOperation
Imports
java.util.Collections, .LinkedHashSet, .Set, org.springframework.lang.Nullable, org.springframework.util.Assert

Base class for cache operations.
Authors
Costin Leau, Stephane Nicoll, Marcin Kamionowski
Since
3.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
CacheOperation.Builder

Base class for builders that can be used to create a CacheOperation.

Field Summary

Modifier and TypeField and Description
private final String
private final Set<String>
private final String
private final String
private final String
private final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
protected
CacheOperation(CacheOperation.Builder b)

Create a new CacheOperation instance from the given builder.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

This implementation compares the toString() results.

public String
public Set<String>
getCacheNames()

Implements org.springframework.cache.interceptor.BasicOperation.getCacheNames.

Return the cache name(s) associated with the operation.

public String
public String
public String
public String
public String
public int
hashCode()

Overrides java.lang.Object.hashCode.

This implementation returns toString()'s hash code.

public final String
toString()

Overrides java.lang.Object.toString.

Return an identifying description for this cache operation.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

cacheManagerback to summary
private final String cacheManager
cacheNamesback to summary
private final Set<String> cacheNames
cacheResolverback to summary
private final String cacheResolver
conditionback to summary
private final String condition
keyback to summary
private final String key
keyGeneratorback to summary
private final String keyGenerator
nameback to summary
private final String name
toStringback to summary
private final String toString

Constructor Detail

CacheOperationback to summary
protected CacheOperation(CacheOperation.Builder b)

Create a new CacheOperation instance from the given builder.

Since
4.3

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

This implementation compares the toString() results.

Parameters
other:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
See Also
toString()
getCacheManagerback to summary
public String getCacheManager()
getCacheNamesback to summary
public Set<String> getCacheNames()

Implements org.springframework.cache.interceptor.BasicOperation.getCacheNames.

Doc from org.springframework.cache.interceptor.BasicOperation.getCacheNames.

Return the cache name(s) associated with the operation.

Annotations
@Override
getCacheResolverback to summary
public String getCacheResolver()
getConditionback to summary
public String getCondition()
getKeyback to summary
public String getKey()
getKeyGeneratorback to summary
public String getKeyGenerator()
getNameback to summary
public String getName()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

This implementation returns toString()'s hash code.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

Annotations
@Override
See Also
toString()
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Return an identifying description for this cache operation.

Returned value is produced by calling Builder#getOperationDescription() during object construction. This method is used in hashCode and equals.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
See Also
Builder#getOperationDescription()
org.springframework.cache.interceptor back to summary

public abstract Class CacheOperation.Builder

extends Object
Class Inheritance
Known Direct Subclasses
org.springframework.cache.interceptor.CachePutOperation.Builder, org.springframework.cache.interceptor.CacheableOperation.Builder, org.springframework.cache.interceptor.CacheEvictOperation.Builder

Base class for builders that can be used to create a CacheOperation.
Since
4.3

Field Summary

Modifier and TypeField and Description
private String
private Set<String>
private String
private String
private String
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract CacheOperation
public String
public Set<String>
public String
public String
public String
protected StringBuilder
getOperationDescription()

Return an identifying description for this caching operation.

public void
setCacheManager(String cacheManager)

public void
setCacheName(String cacheName)

public void
setCacheNames(String... cacheNames)

public void
setCacheResolver(String cacheResolver)

public void
setCondition(String condition)

public void
public void
setKeyGenerator(String keyGenerator)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheManagerback to summary
private String cacheManager
cacheNamesback to summary
private Set<String> cacheNames
cacheResolverback to summary
private String cacheResolver
conditionback to summary
private String condition
keyback to summary
private String key
keyGeneratorback to summary
private String keyGenerator
nameback to summary
private String name

Constructor Detail

Builderback to summary
public Builder()

Method Detail

buildback to summary
public abstract CacheOperation build()
getCacheManagerback to summary
public String getCacheManager()
getCacheNamesback to summary
public Set<String> getCacheNames()
getCacheResolverback to summary
public String getCacheResolver()
getKeyback to summary
public String getKey()
getKeyGeneratorback to summary
public String getKeyGenerator()
getOperationDescriptionback to summary
protected StringBuilder getOperationDescription()

Return an identifying description for this caching operation.

Available to subclasses, for inclusion in their toString() result.

setCacheManagerback to summary
public void setCacheManager(String cacheManager)
setCacheNameback to summary
public void setCacheName(String cacheName)
setCacheNamesback to summary
public void setCacheNames(String... cacheNames)
setCacheResolverback to summary
public void setCacheResolver(String cacheResolver)
setConditionback to summary
public void setCondition(String condition)
setKeyback to summary
public void setKey(String key)
setKeyGeneratorback to summary
public void setKeyGenerator(String keyGenerator)
setNameback to summary
public void setName(String name)