public class SimpleKeyGenerator extends java.lang.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 |
---|---|
java.lang.Object |
generate(java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Object... params)
Generate a key for the given method and its parameters.
|
static java.lang.Object |
generateKey(java.lang.Object... params)
Generate a key based on the specified parameters.
|
public java.lang.Object generate(java.lang.Object target, java.lang.reflect.Method method, java.lang.Object... params)
KeyGenerator
generate
in interface KeyGenerator
target
- the target instancemethod
- the method being calledparams
- the method parameters (with any var-args expanded)public static java.lang.Object generateKey(java.lang.Object... params)