public class SimpleKeyGenerator extends Object implements KeyGenerator
SimpleKey
of the parameters.
Unlike DefaultKeyGenerator
, no collisions will occur with the keys
generated by this class. The returned SimpleKey
object can be safely
used with a ConcurrentMapCache
,
however, might not be suitable for all Cache
implementations.
SimpleKey
,
DefaultKeyGenerator
,
CachingConfigurer
Constructor and Description |
---|
SimpleKeyGenerator() |
Modifier and Type | Method and Description |
---|---|
Object |
generate(Object target,
Method method,
Object... params)
Generate a key for the given method and its parameters.
|
public Object generate(Object target, Method method, Object... params)
KeyGenerator
generate
in interface KeyGenerator
target
- the target instancemethod
- the method being calledparams
- the method parameters (with any var-args expanded)