org.springframework.cache.interceptor
Class DefaultKeyGenerator
java.lang.Object
org.springframework.cache.interceptor.DefaultKeyGenerator
- All Implemented Interfaces:
- KeyGenerator
public class DefaultKeyGenerator
- extends 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
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 Object generate(Object target,
Method method,
Object... params)
- Specified by:
generate
in interface KeyGenerator