spring-framework / org.springframework.cache.interceptor / NameMatchCacheOperationSource

NameMatchCacheOperationSource

open class NameMatchCacheOperationSource : CacheOperationSource, Serializable

Simple CacheOperationSource implementation that allows attributes to be matched by registered name.

Author
Costin Leau

Since
3.1

Constructors

<init>

NameMatchCacheOperationSource()

Simple CacheOperationSource implementation that allows attributes to be matched by registered name.

Functions

addCacheMethod

open fun addCacheMethod(methodName: String, ops: MutableCollection<CacheOperation>): Unit

Add an attribute for a cacheable method.

Method names can be exact matches, or of the pattern "xxx*", "*xxx" or "*xxx*" for matching multiple methods.

equals

open fun equals(other: Any?): Boolean

getCacheOperations

open fun getCacheOperations(method: Method, targetClass: Class<*>): MutableCollection<CacheOperation>

hashCode

open fun hashCode(): Int

setNameMap

open fun setNameMap(nameMap: MutableMap<String, MutableCollection<CacheOperation>>): Unit

Set a name/attribute map, consisting of method names (e.g. "myMethod") and CacheOperation instances (or Strings to be converted to CacheOperation instances).

toString

open fun toString(): String