GigaSpaces XAP 9.1 API

org.openspaces.persistency.cassandra.meta.types
Class CustomTypeInferringSerializer<T>

java.lang.Object
  extended by me.prettyprint.cassandra.serializers.AbstractSerializer<T>
      extended by org.openspaces.persistency.cassandra.meta.types.CustomTypeInferringSerializer<T>
All Implemented Interfaces:
me.prettyprint.hector.api.Serializer<T>

public class CustomTypeInferringSerializer<T>
extends me.prettyprint.cassandra.serializers.AbstractSerializer<T>
implements me.prettyprint.hector.api.Serializer<T>

Variation on hector's type inferring serializer to also include support for big decimal type, float type and double type, to avoid possible NullPointerException and to use the map based SerializerProvider instead of hectors SerializerTypeInferer.

Since:
9.1.1
Author:
Dan Kilman

Constructor Summary
CustomTypeInferringSerializer()
           
 
Method Summary
 T fromByteBuffer(ByteBuffer byteBuffer)
           
static
<T> CustomTypeInferringSerializer<T>
get()
           
 ByteBuffer toByteBuffer(T obj)
           
 
Methods inherited from class me.prettyprint.cassandra.serializers.AbstractSerializer
computeInitialHashSize, fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesMap, toBytesSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface me.prettyprint.hector.api.Serializer
fromBytes, fromBytesList, fromBytesMap, fromBytesSet, getComparatorType, toBytes, toBytesList, toBytesMap, toBytesSet
 

Constructor Detail

CustomTypeInferringSerializer

public CustomTypeInferringSerializer()
Method Detail

get

public static <T> CustomTypeInferringSerializer<T> get()

toByteBuffer

public ByteBuffer toByteBuffer(T obj)
Specified by:
toByteBuffer in interface me.prettyprint.hector.api.Serializer<T>
Specified by:
toByteBuffer in class me.prettyprint.cassandra.serializers.AbstractSerializer<T>

fromByteBuffer

public T fromByteBuffer(ByteBuffer byteBuffer)
Specified by:
fromByteBuffer in interface me.prettyprint.hector.api.Serializer<T>
Specified by:
fromByteBuffer in class me.prettyprint.cassandra.serializers.AbstractSerializer<T>

GigaSpaces XAP 9.1 API

Copyright © GigaSpaces.