public class SimpleKeyGenerator extends Object implements KeyGenerator
SimpleKey
of the parameters.
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
,
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.
|
static Object |
generateKey(Object... params)
Generate a key based on the specified 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)