com.googlecode.ehcache.annotations.key
Class ListCacheKeyGenerator

java.lang.Object
  extended by com.googlecode.ehcache.annotations.key.AbstractCacheKeyGenerator<T>
      extended by com.googlecode.ehcache.annotations.key.AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>
          extended by com.googlecode.ehcache.annotations.key.ListCacheKeyGenerator
All Implemented Interfaces:
CacheKeyGenerator<ReadOnlyList<?>>, ReflectionHelperAware

public class ListCacheKeyGenerator
extends AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>

Version:
$Revision: 656 $
Author:
Eric Dalquist

Nested Class Summary
static class ListCacheKeyGenerator.ListKeyGenerator
           
 
Field Summary
static java.lang.String DEFAULT_BEAN_NAME
          Name of the bean this generator is registered under using the default constructor.
 
Constructor Summary
ListCacheKeyGenerator()
           
ListCacheKeyGenerator(boolean includeMethod, boolean includeParameterTypes)
           
 
Method Summary
protected  void append(ListCacheKeyGenerator.ListKeyGenerator generator, java.lang.Object e)
          Append an object to the key.
protected  void appendGraphCycle(ListCacheKeyGenerator.ListKeyGenerator generator, java.lang.Object o)
          Called if a graph cycle is detected.
protected  void appendNull(ListCacheKeyGenerator.ListKeyGenerator generator)
          Called if a null value is found in the object graph
protected  void beginRecursion(ListCacheKeyGenerator.ListKeyGenerator generator, java.lang.Object e)
          Called before each array/Iterable/Map is handled.
protected  void endRecursion(ListCacheKeyGenerator.ListKeyGenerator generator, java.lang.Object e)
          Called after each array/Iterable/Map is handled.
 ReadOnlyList<?> generateKey(ListCacheKeyGenerator.ListKeyGenerator generator)
          Generate the cache key from the generator
 ListCacheKeyGenerator.ListKeyGenerator getGenerator(java.lang.Object... data)
          Create the object used to generate the key.
 
Methods inherited from class com.googlecode.ehcache.annotations.key.AbstractDeepCacheKeyGenerator
append, append, append, append, append, append, append, append, deepHashCode, deepHashCode, deepHashCode, deepHashCode, generateKey, getReflectionHelper, isUseReflection, reflectionDeepHashCode, setReflectionHelper, setUseReflection, shouldReflect, 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

DEFAULT_BEAN_NAME

public static final java.lang.String DEFAULT_BEAN_NAME
Name of the bean this generator is registered under using the default constructor.

See Also:
Constant Field Values
Constructor Detail

ListCacheKeyGenerator

public ListCacheKeyGenerator()
See Also:
AbstractCacheKeyGenerator.AbstractCacheKeyGenerator()

ListCacheKeyGenerator

public ListCacheKeyGenerator(boolean includeMethod,
                             boolean includeParameterTypes)
See Also:
AbstractCacheKeyGenerator.AbstractCacheKeyGenerator(boolean, boolean)
Method Detail

getGenerator

public ListCacheKeyGenerator.ListKeyGenerator getGenerator(java.lang.Object... data)
Description copied from class: AbstractDeepCacheKeyGenerator
Create the object used to generate the key. This object is passed into every AbstractDeepCacheKeyGenerator.deepHashCode(G, java.lang.Object[]) and AbstractDeepCacheKeyGenerator.append(G, java.lang.Object) call.

Specified by:
getGenerator in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>

generateKey

public ReadOnlyList<?> generateKey(ListCacheKeyGenerator.ListKeyGenerator generator)
Description copied from class: AbstractDeepCacheKeyGenerator
Generate the cache key from the generator

Specified by:
generateKey in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>

beginRecursion

protected void beginRecursion(ListCacheKeyGenerator.ListKeyGenerator generator,
                              java.lang.Object e)
Description copied from class: AbstractDeepCacheKeyGenerator
Called before each array/Iterable/Map is handled. Useful for sub-classes that want to be aware of the tree structure of the object graph.

Overrides:
beginRecursion in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>

endRecursion

protected void endRecursion(ListCacheKeyGenerator.ListKeyGenerator generator,
                            java.lang.Object e)
Description copied from class: AbstractDeepCacheKeyGenerator
Called after each array/Iterable/Map is handled. Useful for sub-classes that want to be aware of the tree structure of the object graph.

Overrides:
endRecursion in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>

appendGraphCycle

protected void appendGraphCycle(ListCacheKeyGenerator.ListKeyGenerator generator,
                                java.lang.Object o)
Description copied from class: AbstractDeepCacheKeyGenerator
Called if a graph cycle is detected.

Specified by:
appendGraphCycle in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>
o - The object that started the cycle

appendNull

protected void appendNull(ListCacheKeyGenerator.ListKeyGenerator generator)
Description copied from class: AbstractDeepCacheKeyGenerator
Called if a null value is found in the object graph

Specified by:
appendNull in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>

append

protected void append(ListCacheKeyGenerator.ListKeyGenerator generator,
                      java.lang.Object e)
Description copied from class: AbstractDeepCacheKeyGenerator
Append an object to the key.

Specified by:
append in class AbstractDeepCacheKeyGenerator<ListCacheKeyGenerator.ListKeyGenerator,ReadOnlyList<?>>


Copyright © 2011. All Rights Reserved.