public interface SerializationService
Modifier and Type | Method and Description |
---|---|
ManagedContext |
getManagedContext()
|
<B extends Data> |
toData(Object obj)
Serializes an object to a
Data . |
<B extends Data> |
toData(Object obj,
PartitioningStrategy strategy)
Serializes an object to a
Data . |
<T> T |
toObject(Object data)
Deserializes an object.
|
<T> T |
toObject(Object data,
Class klazz)
Deserializes an object.
|
<B extends Data> B toData(Object obj)
Data
.
This method can safely be called with a Data
instance. In that case, that instance is returned.
If this method is called with null, null is returned.obj
- the object to serialize.HazelcastSerializationException
- when serialization fails.<B extends Data> B toData(Object obj, PartitioningStrategy strategy)
Data
.
This method can safely be called with a Data
instance. In that case, that instance is returned.
If this method is called with null, null is returned.obj
- the object to serialize.strategy
- strategy is used to calculate partition id of the resulting data see PartitioningStrategy
HazelcastSerializationException
- when serialization fails.<T> T toObject(Object data)
data
- the data to deserialize.HazelcastSerializationException
- when deserialization fails.<T> T toObject(Object data, Class klazz)
data
- the data to deserialize.klazz
- The class to instantiate when deserializing the object.HazelcastSerializationException
- when deserialization fails.ManagedContext getManagedContext()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.