me.prettyprint.cassandra.serializers
Class TimeUUIDSerializer

java.lang.Object
  extended by me.prettyprint.cassandra.serializers.AbstractSerializer<com.eaio.uuid.UUID>
      extended by me.prettyprint.cassandra.serializers.TimeUUIDSerializer
All Implemented Interfaces:
Serializer<com.eaio.uuid.UUID>

public final class TimeUUIDSerializer
extends AbstractSerializer<com.eaio.uuid.UUID>

A UUIDSerializer translates the byte[] to and from UUID types. for Time based UUIDS

Author:
Todd Nine

Constructor Summary
TimeUUIDSerializer()
           
 
Method Summary
 com.eaio.uuid.UUID fromByteBuffer(ByteBuffer bytes)
          Extract an object of type T from the bytes.
static TimeUUIDSerializer get()
           
 ComparatorType getComparatorType()
           
 ByteBuffer toByteBuffer(com.eaio.uuid.UUID uuid)
          Extract bytes from the obj of type T
 
Methods inherited from class me.prettyprint.cassandra.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, toBytes, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeUUIDSerializer

public TimeUUIDSerializer()
Method Detail

get

public static TimeUUIDSerializer get()

toByteBuffer

public ByteBuffer toByteBuffer(com.eaio.uuid.UUID uuid)
Description copied from interface: Serializer
Extract bytes from the obj of type T

Specified by:
toByteBuffer in interface Serializer<com.eaio.uuid.UUID>
Specified by:
toByteBuffer in class AbstractSerializer<com.eaio.uuid.UUID>
Returns:

fromByteBuffer

public com.eaio.uuid.UUID fromByteBuffer(ByteBuffer bytes)
Description copied from interface: Serializer
Extract an object of type T from the bytes.

Specified by:
fromByteBuffer in interface Serializer<com.eaio.uuid.UUID>
Specified by:
fromByteBuffer in class AbstractSerializer<com.eaio.uuid.UUID>
Returns:

getComparatorType

public ComparatorType getComparatorType()
Specified by:
getComparatorType in interface Serializer<com.eaio.uuid.UUID>
Overrides:
getComparatorType in class AbstractSerializer<com.eaio.uuid.UUID>


Copyright © 2011. All Rights Reserved.