Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::SerializationConfig Class Reference

SerializationConfig is used to. More...

#include <SerializationConfig.h>

Public Member Functions

 SerializationConfig ()
 Constructor default value of version is zero.
 
int getPortableVersion () const
 Portable version will be used to differentiate two same class that have changes on it , like adding/removing field or changing a type of a field. More...
 
SerializationConfigsetPortableVersion (int portableVersion)
 
std::vector< boost::shared_ptr< serialization::SerializerBase > > const & getSerializers () const
 
SerializationConfigregisterSerializer (boost::shared_ptr< serialization::SerializerBase > serializer)
 
SerializationConfigregisterSerializer (boost::shared_ptr< serialization::StreamSerializer > serializer)
 One can implement custom serializers other than Portable and IdentifiedDataSerializable to be used in serialization of user objects. More...
 
SerializationConfigaddDataSerializableFactory (int32_t factoryId, boost::shared_ptr< serialization::DataSerializableFactory > dataSerializableFactory)
 
SerializationConfigaddPortableFactory (int32_t factoryId, boost::shared_ptr< serialization::PortableFactory > portableFactory)
 
const std::map< int32_t, boost::shared_ptr< serialization::DataSerializableFactory > > & getDataSerializableFactories () const
 
const std::map< int32_t, boost::shared_ptr< serialization::PortableFactory > > & getPortableFactories () const
 
SerializationConfigsetGlobalSerializer (const boost::shared_ptr< serialization::StreamSerializer > &serializer)
 If no other serializer exists for a received binary data type id, then this registered serializer will be utilized. More...
 
const boost::shared_ptr< serialization::StreamSerializer > & getGlobalSerializer () const
 

Detailed Description

SerializationConfig is used to.

Member Function Documentation

◆ addDataSerializableFactory()

SerializationConfig & hazelcast::client::SerializationConfig::addDataSerializableFactory ( int32_t  factoryId,
boost::shared_ptr< serialization::DataSerializableFactory dataSerializableFactory 
)
Parameters
factoryIdfactory ID of DataSerializableFactory to be registered
dataSerializableFactoryDataSerializableFactory object to be registered
Returns
configured SerializerConfig for chaining
See also
DataSerializableFactory

◆ addPortableFactory()

SerializationConfig & hazelcast::client::SerializationConfig::addPortableFactory ( int32_t  factoryId,
boost::shared_ptr< serialization::PortableFactory portableFactory 
)
Parameters
factoryIdfactory ID of portableFactory to be registered
portableFactoryportableFactory object to be registered
Returns
configured SerializerConfig for chaining
See also
PortableFactory

◆ getGlobalSerializer()

const boost::shared_ptr< serialization::StreamSerializer > & hazelcast::client::SerializationConfig::getGlobalSerializer ( ) const
Returns
The configured global serializer.

◆ getPortableVersion()

int hazelcast::client::SerializationConfig::getPortableVersion ( ) const

Portable version will be used to differentiate two same class that have changes on it , like adding/removing field or changing a type of a field.

Returns
version of portable classes that will be created by this client

◆ getSerializers()

std::vector< boost::shared_ptr< serialization::SerializerBase > > const & hazelcast::client::SerializationConfig::getSerializers ( ) const
Returns
vector of registered custom serializers

◆ registerSerializer() [1/2]

SerializationConfig & hazelcast::client::SerializationConfig::registerSerializer ( boost::shared_ptr< serialization::SerializerBase serializer)
Deprecated:
Please use registerSerializer(boost::shared_ptr<serialization::StreamSerializer> serializer)

One can implement custom serializers other than Portable and IdentifiedDataSerializable to be used in serialization of user objects. For details

See also
Serializer
Parameters
serializercustom serializer to be registered

◆ registerSerializer() [2/2]

SerializationConfig & hazelcast::client::SerializationConfig::registerSerializer ( boost::shared_ptr< serialization::StreamSerializer serializer)

One can implement custom serializers other than Portable and IdentifiedDataSerializable to be used in serialization of user objects.

For details

See also
Serializer
Parameters
serializercustom serializer to be registered

◆ setGlobalSerializer()

SerializationConfig & hazelcast::client::SerializationConfig::setGlobalSerializer ( const boost::shared_ptr< serialization::StreamSerializer > &  serializer)

If no other serializer exists for a received binary data type id, then this registered serializer will be utilized.

Parameters
serializerThe global serializer that needs to be registered.
Returns
The serialization configuration reference.

◆ setPortableVersion()

SerializationConfig & hazelcast::client::SerializationConfig::setPortableVersion ( int  portableVersion)
Parameters
portableVersion
Returns
itself SerializationConfig

The documentation for this class was generated from the following files: