org.openspaces.persistency.cassandra.meta.types.dynamic
Class DynamicPropertyValueSerializer
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
Copyright © GigaSpaces.