com.netflix.astyanax.mapping
Class MappingCache

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

public class MappingCache
extends 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(Class<T> clazz)
          Return a new or cached mapper
<T> Mapping<T>
getMapping(Class<T> clazz, AnnotationSet<?,?> annotationSet)
          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(Class<T> clazz)
Return a new or cached mapper

Parameters:
clazz - class for the mapper
Returns:
mapper

getMapping

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

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


Copyright © 2012. All Rights Reserved.