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.
|
<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.ManagedContext getManagedContext()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.