com.netflix.astyanax.mapping
Class MappingCache

java.lang.Object
  extended by com.netflix.astyanax.mapping.MappingCache

public class MappingCache
extends java.lang.Object

Utility to cache mappers. There's a small performance hit to reflect on a bean. This cache, re-uses mappers for a given bean


Constructor Summary
MappingCache()
           
 
Method Summary
<T> Mapping<T>
getMapping(java.lang.Class<T> clazz)
           
<T> Mapping<T>
getMapping(java.lang.Class<T> clazz, AnnotationSet<?,?> annotationSet)
           
<T> Mapping<T>
getMapping(java.lang.Class<T> clazz, AnnotationSet<?,?> annotationSet, boolean includeParentFields)
          Return a new or cached mapper
<T> Mapping<T>
getMapping(java.lang.Class<T> clazz, boolean includeParentFields)
          Return a new or cached mapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingCache

public MappingCache()
Method Detail

getMapping

public <T> Mapping<T> getMapping(java.lang.Class<T> clazz,
                                 boolean includeParentFields)
Return a new or cached mapper

Parameters:
clazz - class for the mapper
Returns:
mapper

getMapping

public <T> Mapping<T> getMapping(java.lang.Class<T> clazz)

getMapping

public <T> Mapping<T> getMapping(java.lang.Class<T> clazz,
                                 AnnotationSet<?,?> annotationSet,
                                 boolean includeParentFields)
Return a new or cached mapper

Parameters:
clazz - class for the mapper
annotationSet - annotation set for the mapper
Returns:
mapper

getMapping

public <T> Mapping<T> getMapping(java.lang.Class<T> clazz,
                                 AnnotationSet<?,?> annotationSet)