org.springframework.cache.interceptor
Class DefaultKeyGenerator
java.lang.Object
org.springframework.cache.interceptor.DefaultKeyGenerator
- All Implemented Interfaces:
- KeyGenerator
public class DefaultKeyGenerator
- extends java.lang.Object
- implements KeyGenerator
Default key generator. Returns 0 if no
parameters are provided, the parameter itself if only one is given or
a hash code computed from all given parameters' hash code values.
Uses the constant value 53 for any
null
parameters given.
- Since:
- 3.1
- Author:
- Costin Leau, Chris Beams
Method Summary |
java.lang.Object |
generate(java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Object... params)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_PARAM_KEY
public static final int NO_PARAM_KEY
- See Also:
- Constant Field Values
NULL_PARAM_KEY
public static final int NULL_PARAM_KEY
- See Also:
- Constant Field Values
DefaultKeyGenerator
public DefaultKeyGenerator()
generate
public java.lang.Object generate(java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Object... params)
- Specified by:
generate
in interface KeyGenerator