Loading...
Searching...
No Matches
SmartDataDistribution< T > Class Template Reference

Smart class to manage DataDistribution. More...

#include <SmartDataDistributionManager.h>

Inheritance diagram for SmartDataDistribution< T >:
SmartDataDistributionBase IDataDistributionCallback IDataDistributionMastershipCallback

Public Member Functions

 SmartDataDistribution ()
 Initialize a new SmartDataDistribution.
 
 ~SmartDataDistribution ()
 Destructor of SmartDataDistribution.
 
T * CreateSmartChannel (const char *channelName, DDM_CHANNEL_DIRECTION direction=DDM_CHANNEL_DIRECTION::ALL, const char *arrayParams[]=NULL, int len=0)
 Creates a new smart channel.
 
- Public Member Functions inherited from SmartDataDistributionBase
 SmartDataDistributionBase ()
 Initialize a new SmartDataDistributionBase.
 
 ~SmartDataDistributionBase ()
 Destructor of SmartDataDistributionBase.
 
OPERATION_RESULT Initialize (const char *conf_file, const char *hostAddress=0, const char *channelTrailer=0)
 Initialize SmartDataDistributionBase system.
 
OPERATION_RESULT Initialize (const char *arrayParams[], int len, const char *hostAddress=0, const char *channelTrailer=0)
 Initialize IDataDistribution instance.
 
OPERATION_RESULT RequestMastershipManager (const char *hostAddress=NULL, const char *arrayParams[]=NULL, int len=0)
 Allocate and initialize the mastership manager.
 
BOOL Start (unsigned long timeout)
 Start the common manager.
 
BOOL Stop (unsigned long timeout)
 Stop the common manager.
 
std::string GetProtocol ()
 Returns the protocol in use from IDataDistribution instance.
 
std::string GetProtocolLib ()
 Returns the protocol library in use from IDataDistribution instance.
 
std::string GetMastershipLib ()
 Returns the mastership library in use from IDataDistribution instance.
 

Additional Inherited Members

- Protected Member Functions inherited from SmartDataDistributionBase
virtual const char * OnConfiguration (const char *channelName, const char *key, const char *value)
 Function invoked during configuration validation.
 
virtual void OnLogging (DDM_LOG_LEVEL level, const char *source, const char *function, const char *logStr)
 Function invoked when a log is emitted from subsystem.
 
virtual void OnCompletelyDisconnected (const char *channelName, const char *reason)
 Callback invoked on a complete disconnection.
 
virtual void OnClusterStateChange (DDM_CLUSTEREVENT change, int64_t serverid)
 Callback invoked to report cluster state change.
 
virtual void OnStateChange (DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)
 Callback invoked to report a state change.
 
virtual void OnStateReady (void *pState, int64_t len)
 Callback invoked when a state transfer is completed.
 
virtual void OnRequestedState (void **pState, size_t *len)
 Callback invoked when a state transfer is requested.
 
virtual void OnMultiplePrimary (int64_t myId, int64_t otherId)
 Callback invoked when multiple primary server are detected.
 
virtual void FirstStateChange (DDM_INSTANCE_STATE newState)
 Callback invoked to report a first state change.
 
virtual void ChangingState (DDM_INSTANCE_STATE actualState, DDM_INSTANCE_STATE futureState)
 Callback invoked to report a starting instance state change.
 
virtual void ChangedState (DDM_INSTANCE_STATE actualState)
 Callback invoked to report a finished instance state change.
 
virtual const char * OnConfiguration (const char *channelName, const char *key, const char *value)=0
 Invoked during configuration validation.
 
virtual void OnLogging (DDM_LOG_LEVEL level, const char *source, const char *function, const char *logStr)=0
 Callback invoked when a log is emitted from subsystem.
 
virtual void OnCompletelyDisconnected (const char *channelName, const char *reason)=0
 Callback invoked on a complete disconnection.
 
virtual void OnClusterStateChange (DDM_CLUSTEREVENT change, int64_t serverid)=0
 Callback invoked to report cluster state change.
 
virtual void OnStateChange (DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)=0
 Callback invoked to report a state change.
 
virtual void OnStateReady (void *pState, int64_t len)=0
 Callback invoked when a state transfer is completed.
 
virtual void OnRequestedState (void **pState, size_t *len)=0
 Callback invoked when a state transfer is requested.
 
virtual void OnMultiplePrimary (int64_t myId, int64_t otherId)=0
 Callback invoked when multiple primary server are detected.
 
virtual void FirstStateChange (DDM_INSTANCE_STATE newState)=0
 Callback invoked to report a first state change.
 
virtual void ChangingState (DDM_INSTANCE_STATE actualState, DDM_INSTANCE_STATE futureState)=0
 Callback invoked to report a starting instance state change.
 
virtual void ChangedState (DDM_INSTANCE_STATE actualState)=0
 Callback invoked to report a finished instance state change.
 
- Protected Attributes inherited from SmartDataDistributionBase
IDataDistributionm_pIDataDistribution
 
IDataDistributionMastershipCommonm_pIDataDistributionMastershipCommon
 
OPERATION_RESULT m_pInitializeHRESULT
 

Detailed Description

template<typename T>
class SmartDataDistribution< T >

Smart class to manage DataDistribution.

Template Parameters
TThe class inherited from SmartDataDistributionChannel

Constructor & Destructor Documentation

◆ SmartDataDistribution()

template<typename T >
SmartDataDistribution< T >::SmartDataDistribution ( )
inline

Initialize a new SmartDataDistribution.

◆ ~SmartDataDistribution()

template<typename T >
SmartDataDistribution< T >::~SmartDataDistribution ( )
inline

Destructor of SmartDataDistribution.

Member Function Documentation

◆ CreateSmartChannel()

template<typename T >
T * SmartDataDistribution< T >::CreateSmartChannel ( const char *  channelName,
DDM_CHANNEL_DIRECTION  direction = DDM_CHANNEL_DIRECTION::ALL,
const char *  arrayParams[] = NULL,
int  len = 0 
)
inline

Creates a new smart channel.

channelName the name of the channel direction DDM_CHANNEL_DIRECTION direction, default is DDM_CHANNEL_DIRECTION::ALL arrayParams an array of string in the form key=value to override parameters passed into IDataDistribution::Initialize len length of arrayParams

Returns
T* the allocated instance

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