me.prettyprint.cassandra.serializers
Class TypeInferringSerializer<T>
java.lang.Object
me.prettyprint.cassandra.serializers.AbstractSerializer<T>
me.prettyprint.cassandra.serializers.TypeInferringSerializer<T>
- Type Parameters:
T
- type
- All Implemented Interfaces:
- Serializer<T>
public class TypeInferringSerializer<T>
- extends AbstractSerializer<T>
- implements Serializer<T>
A serializer that dynamically delegates to a proper serializer based on the
value passed
- Author:
- Bozhidar Bozhanov
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeInferringSerializer
public TypeInferringSerializer()
get
public static <T> TypeInferringSerializer<T> get()
toByteBuffer
public 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(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:
Copyright © 2011. All Rights Reserved.