com.netflix.astyanax.serializers
Class AnnotatedCompositeSerializer<T>

java.lang.Object
  extended by com.netflix.astyanax.serializers.AbstractSerializer<T>
      extended by com.netflix.astyanax.serializers.AnnotatedCompositeSerializer<T>
Type Parameters:
T -
All Implemented Interfaces:
Serializer<T>

public class AnnotatedCompositeSerializer<T>
extends AbstractSerializer<T>

Serializer for a Pojo annotated with Component field annotations Serialized data is formatted as a list of components with each component having the format: <2 byte length><0>


Nested Class Summary
static class AnnotatedCompositeSerializer.ComponentSerializer<P>
          Serializer for a single component within the Pojo
 
Constructor Summary
AnnotatedCompositeSerializer(java.lang.Class<T> clazz)
           
AnnotatedCompositeSerializer(java.lang.Class<T> clazz, boolean includeParentFields)
           
AnnotatedCompositeSerializer(java.lang.Class<T> clazz, int bufferSize)
           
AnnotatedCompositeSerializer(java.lang.Class<T> clazz, int bufferSize, boolean includeParentFields)
           
 
Method Summary
 CompositeRangeBuilder buildRange()
           
 T fromByteBuffer(java.nio.ByteBuffer byteBuffer)
          Extract an object of type T from the bytes.
 ComparatorType getComparatorType()
           
<T1> RangeEndpoint
makeEndpoint(T1 value, Equality equality)
           
 java.nio.ByteBuffer toByteBuffer(T obj)
          Extract bytes from the obj of type T
 
Methods inherited from class com.netflix.astyanax.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, fromString, getNext, getString, toBytes, toBytesList, toBytesList, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedCompositeSerializer

public AnnotatedCompositeSerializer(java.lang.Class<T> clazz,
                                    boolean includeParentFields)

AnnotatedCompositeSerializer

public AnnotatedCompositeSerializer(java.lang.Class<T> clazz)

AnnotatedCompositeSerializer

public AnnotatedCompositeSerializer(java.lang.Class<T> clazz,
                                    int bufferSize)

AnnotatedCompositeSerializer

public AnnotatedCompositeSerializer(java.lang.Class<T> clazz,
                                    int bufferSize,
                                    boolean includeParentFields)
Method Detail

toByteBuffer

public java.nio.ByteBuffer toByteBuffer(T obj)
Description copied from interface: Serializer
Extract bytes from the obj of type T

Specified by:
toByteBuffer in interface Serializer<T>
Specified by:
toByteBuffer in class AbstractSerializer<T>
Returns:

fromByteBuffer

public T fromByteBuffer(java.nio.ByteBuffer byteBuffer)
Description copied from interface: Serializer
Extract an object of type T from the bytes.

Specified by:
fromByteBuffer in interface Serializer<T>
Specified by:
fromByteBuffer in class AbstractSerializer<T>
Returns:

getComparatorType

public ComparatorType getComparatorType()
Specified by:
getComparatorType in interface Serializer<T>
Overrides:
getComparatorType in class AbstractSerializer<T>

buildRange

public CompositeRangeBuilder buildRange()

makeEndpoint

public <T1> RangeEndpoint makeEndpoint(T1 value,
                                       Equality equality)