|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.ehcache.annotations.key.AbstractCacheKeyGenerator<T>
com.googlecode.ehcache.annotations.key.AbstractDeepCacheKeyGenerator<G,T>
com.googlecode.ehcache.annotations.key.AbstractHashingCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
com.googlecode.ehcache.annotations.key.MessageDigestCacheKeyGenerator
public class MessageDigestCacheKeyGenerator
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_ALGORITHM
|
static java.lang.String |
DEFAULT_BEAN_NAME
Name of the bean this generator is registered under using the default constructor. |
protected static int |
DEFAULT_BYTE_BUFFER_SIZE
|
protected org.slf4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
MessageDigestCacheKeyGenerator()
Uses DEFAULT_ALGORITHM for the algorithm |
|
MessageDigestCacheKeyGenerator(boolean includeMethod,
boolean includeParameterTypes)
Uses DEFAULT_ALGORITHM for the algorithm |
|
MessageDigestCacheKeyGenerator(java.lang.String algorithm)
|
|
MessageDigestCacheKeyGenerator(java.lang.String algorithm,
boolean includeMethod,
boolean includeParameterTypes)
|
|
| Method Summary | |
|---|---|
protected void |
append(MessageDigestOutputStream generator,
boolean[] a)
Append a boolean array. |
protected void |
append(MessageDigestOutputStream generator,
byte[] a)
Append a byte array. |
protected void |
append(MessageDigestOutputStream generator,
char[] a)
Append a char array. |
protected void |
append(MessageDigestOutputStream generator,
double[] a)
Append a double array. |
protected void |
append(MessageDigestOutputStream generator,
float[] a)
Append a float array. |
protected void |
append(MessageDigestOutputStream generator,
int[] a)
Append a int array. |
protected void |
append(MessageDigestOutputStream generator,
long[] a)
Append a long array. |
protected void |
append(MessageDigestOutputStream generator,
short[] a)
Append a short array. |
protected void |
appendGraphCycle(MessageDigestOutputStream generator,
java.lang.Object o)
Called if a graph cycle is detected. |
protected void |
appendHash(MessageDigestOutputStream generator,
java.lang.Object e)
|
protected void |
appendNull(MessageDigestOutputStream generator)
Called if a null value is found in the object graph |
protected java.lang.String |
encodeHash(byte[] digest)
Encode the digested hash bytes as a String |
java.lang.String |
generateKey(MessageDigestOutputStream generator)
Generate the cache key from the generator |
MessageDigestOutputStream |
getGenerator(java.lang.Object... data)
Create the object used to generate the key. |
protected java.security.MessageDigest |
getMessageDigest()
Tries to clone the MessageDigest that was created during construction. |
| Methods inherited from class com.googlecode.ehcache.annotations.key.AbstractHashingCacheKeyGenerator |
|---|
append, appendClass, appendEnum, shouldReflect |
| Methods inherited from class com.googlecode.ehcache.annotations.key.AbstractDeepCacheKeyGenerator |
|---|
beginRecursion, deepHashCode, deepHashCode, deepHashCode, deepHashCode, endRecursion, generateKey, getReflectionHelper, isUseReflection, reflectionDeepHashCode, setReflectionHelper, setUseReflection, toString |
| Methods inherited from class com.googlecode.ehcache.annotations.key.AbstractCacheKeyGenerator |
|---|
generateKey, isCheckforCycles, isIncludeMethod, isIncludeParameterTypes, register, setCheckforCycles, setIncludeMethod, setIncludeParameterTypes, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_BEAN_NAME
public static final java.lang.String DEFAULT_ALGORITHM
protected static final int DEFAULT_BYTE_BUFFER_SIZE
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public MessageDigestCacheKeyGenerator()
throws java.security.NoSuchAlgorithmException
DEFAULT_ALGORITHM for the algorithm
java.security.NoSuchAlgorithmExceptionAbstractCacheKeyGenerator.AbstractCacheKeyGenerator()
public MessageDigestCacheKeyGenerator(java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionAbstractCacheKeyGenerator.AbstractCacheKeyGenerator()
public MessageDigestCacheKeyGenerator(boolean includeMethod,
boolean includeParameterTypes)
throws java.security.NoSuchAlgorithmException
DEFAULT_ALGORITHM for the algorithm
java.security.NoSuchAlgorithmExceptionAbstractCacheKeyGenerator.AbstractCacheKeyGenerator(boolean, boolean)
public MessageDigestCacheKeyGenerator(java.lang.String algorithm,
boolean includeMethod,
boolean includeParameterTypes)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionAbstractCacheKeyGenerator.AbstractCacheKeyGenerator(boolean, boolean)| Method Detail |
|---|
public MessageDigestOutputStream getGenerator(java.lang.Object... data)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.deepHashCode(G, java.lang.Object[]) and
AbstractDeepCacheKeyGenerator.append(G, java.lang.Object) call.
getGenerator in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>public java.lang.String generateKey(MessageDigestOutputStream generator)
AbstractDeepCacheKeyGenerator
generateKey in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>protected java.lang.String encodeHash(byte[] digest)
protected java.security.MessageDigest getMessageDigest()
MessageDigest that was created during construction. If the clone fails
that is remembered and from that point on new MessageDigest instances will be created on
every call.
MessageDigest to use during a call to AbstractDeepCacheKeyGenerator.generateKey(Object...)
protected void append(MessageDigestOutputStream generator,
boolean[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle boolean or boolean array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
byte[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle byte or byte array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
char[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle char or char array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
double[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle double or double array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
float[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle float or float array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
int[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle int or int array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
long[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle long or long array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void append(MessageDigestOutputStream generator,
short[] a)
AbstractDeepCacheKeyGeneratorAbstractDeepCacheKeyGenerator.append(Object, Object) on each value in
the array. If the implementing class can handle short or short array primitives
directly this should be overridden to avoid auto-boxing each array element.
append in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void appendGraphCycle(MessageDigestOutputStream generator,
java.lang.Object o)
AbstractDeepCacheKeyGenerator
appendGraphCycle in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>o - The object that started the cycleprotected void appendNull(MessageDigestOutputStream generator)
AbstractDeepCacheKeyGenerator
appendNull in class AbstractDeepCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
protected void appendHash(MessageDigestOutputStream generator,
java.lang.Object e)
appendHash in class AbstractHashingCacheKeyGenerator<MessageDigestOutputStream,java.lang.String>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||