GigaSpaces XAP 9.5 API

org.openspaces.persistency.cassandra.meta.types.dynamic
Class DynamicPropertyValueSerializer

java.lang.Object
  extended by org.openspaces.persistency.cassandra.meta.types.dynamic.DynamicPropertyValueSerializer
All Implemented Interfaces:
PropertyValueSerializer

public class DynamicPropertyValueSerializer
extends Object
implements PropertyValueSerializer

Serialized objects will contain a prefix denoting the type of the value and will be deserialized appropriately based on this prefix. Default serialization machanizm for non primitive, non common java types is standard object serialization. Object/BigInteger/BigDecimal serialization logic borrowed from hector serializers, rest is a modification of https://gist.github.com/850865

Since:
9.1.1
Author:
Dan Kilman

Method Summary
 Object fromByteBuffer(ByteBuffer byteBuffer)
           
static DynamicPropertyValueSerializer get()
           
 ByteBuffer toByteBuffer(Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static DynamicPropertyValueSerializer get()

toByteBuffer

public ByteBuffer toByteBuffer(Object obj)
Specified by:
toByteBuffer in interface PropertyValueSerializer
Parameters:
obj - The object to serialize.
Returns:
A ByteBuffer holding a serialized form of the value argument.

fromByteBuffer

public Object fromByteBuffer(ByteBuffer byteBuffer)
Specified by:
fromByteBuffer in interface PropertyValueSerializer
Parameters:
byteBuffer - Holds the bytes as originally serialized using PropertyValueSerializer.toByteBuffer(Object).
Returns:
The deserialized object value.

GigaSpaces XAP 9.5 API

Copyright © GigaSpaces.