com.netflix.astyanax.serializers
Class CompositeSerializer

java.lang.Object
  extended by com.netflix.astyanax.serializers.AbstractSerializer<Composite>
      extended by com.netflix.astyanax.serializers.CompositeSerializer
All Implemented Interfaces:
Serializer<Composite>
Direct Known Subclasses:
SpecificCompositeSerializer

public class CompositeSerializer
extends AbstractSerializer<Composite>


Constructor Summary
CompositeSerializer()
           
 
Method Summary
 Composite fromByteBuffer(java.nio.ByteBuffer byteBuffer)
          Extract an object of type T from the bytes.
static CompositeSerializer get()
           
 java.util.List<java.lang.String> getComparators()
           
 ComparatorType getComparatorType()
           
 java.nio.ByteBuffer getNext(java.nio.ByteBuffer byteBuffer)
          Return the byte buffer for the next value in sorted order for the matching comparator type.
 java.nio.ByteBuffer toByteBuffer(Composite obj)
          Extract bytes from the obj of type T
 
Methods inherited from class com.netflix.astyanax.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, fromString, 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

CompositeSerializer

public CompositeSerializer()
Method Detail

get

public static CompositeSerializer get()

toByteBuffer

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

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

fromByteBuffer

public Composite 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<Composite>
Specified by:
fromByteBuffer in class AbstractSerializer<Composite>
Returns:

getNext

public java.nio.ByteBuffer getNext(java.nio.ByteBuffer byteBuffer)
Description copied from interface: Serializer
Return the byte buffer for the next value in sorted order for the matching comparator type. This is used for paginating columns.

Specified by:
getNext in interface Serializer<Composite>
Overrides:
getNext in class AbstractSerializer<Composite>
Returns:

getComparatorType

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

getComparators

public java.util.List<java.lang.String> getComparators()