Hazelcast C++ Client
|
Implement this interface and register to the SerializationConfig. More...
#include <Serializer.h>
Public Member Functions | |
virtual void | write (ObjectDataOutput &out, const void *object)=0 |
This method writes object to ObjectDataOutput. More... | |
virtual void * | read (ObjectDataInput &in)=0 |
The factory method to construct the custom objects Override this method if you want to provide a factory for the custom object. More... | |
Public Member Functions inherited from hazelcast::client::serialization::SerializerBase | |
virtual int32_t | getHazelcastTypeId () const =0 |
unique type id for this serializer. More... | |
virtual void | destroy () |
Called when instance is shutting down. More... | |
Implement this interface and register to the SerializationConfig.
See examples folder for usage examples.
Important note: Except for the global serializer implementation, you need to implement the following free function in same namespace with your class int32_t getHazelcastTypeId(const MyClass*);
which should return same id with its serializer's getHazelcastTypeId() method.
|
pure virtual |
The factory method to construct the custom objects Override this method if you want to provide a factory for the custom object.
The memory should be managed correctly to avoid any leaks.
in | The input stream to be read. |
Implemented in hazelcast::client::serialization::Serializer< T >.
|
pure virtual |
This method writes object to ObjectDataOutput.
out | ObjectDataOutput stream that object will be written to |
object | that will be written to out |
Implemented in hazelcast::client::serialization::Serializer< T >.