Interface ISmartDataDistribution
- Namespace
- MASES.DataDistributionManager.Bindings
- Assembly
- DataDistributionManagerNet.dll
Interface to interact with underlying system
public interface ISmartDataDistribution
Properties
MastershipLib
Return the mastership library in use
string MastershipLib { get; }
Property Value
MastershipManager
Returns ISmartDataDistributionMastership reference
ISmartDataDistributionMastership MastershipManager { get; }
Property Value
Protocol
Return the protocol in use
string Protocol { get; }
Property Value
ProtocolLib
Return the protocol library in use
string ProtocolLib { get; }
Property Value
Methods
CreateSmartChannel<T>(string, IConfiguration, DDM_CHANNEL_DIRECTION)
Creates a channel with IConfiguration
T CreateSmartChannel<T>(string channelName, IConfiguration configuration = null, DDM_CHANNEL_DIRECTION direction = DDM_CHANNEL_DIRECTION.ALL) where T : SmartDataDistributionChannel
Parameters
channelNamestringThe channel name
configurationIConfigurationThe configuration coming from an instance of IConfiguration
directionDDM_CHANNEL_DIRECTIONThe DDM_CHANNEL_DIRECTION. Default is ALL
Returns
- T
An allocated instance of
T
Type Parameters
TA Type which inherits SmartDataDistributionChannel
CreateSmartChannel<T>(string, string[], DDM_CHANNEL_DIRECTION)
Creates a channel
T CreateSmartChannel<T>(string channelName, string[] arrayParams, DDM_CHANNEL_DIRECTION direction = DDM_CHANNEL_DIRECTION.ALL) where T : SmartDataDistributionChannel
Parameters
channelNamestringThe channel name
arrayParamsstring[]Specific parameters which override main parameters
directionDDM_CHANNEL_DIRECTIONThe DDM_CHANNEL_DIRECTION. Default is ALL
Returns
- T
An allocated instance of
T
Type Parameters
TA Type which inherits SmartDataDistributionChannel
GetParameter(DDM_GENERAL_PARAMETER)
Get global parameter
string GetParameter(DDM_GENERAL_PARAMETER paramId)
Parameters
paramIdDDM_GENERAL_PARAMETERDDM_GENERAL_PARAMETER parameter to get
Returns
- string
Parameter value
GetParameter(string)
Get global parameter
string GetParameter(string paramName)
Parameters
paramNamestringParameter to get
Returns
- string
Parameter value
Initialize(IConfiguration, string, string)
Initialize the instance using a configuration instance
OPERATION_RESULT Initialize(IConfiguration configuration, string szMyAddress = null, string channelTrailer = null)
Parameters
configurationIConfigurationThe configuration coming from an instance of IConfiguration
szMyAddressstringThe name of the server hosting the process
channelTrailerstringTrailer string to append on channel names
Returns
Initialize(string, string, string)
Initialize the instance using configuration file
OPERATION_RESULT Initialize(string conf_file, string szMyAddress = null, string channelTrailer = null)
Parameters
conf_filestringConfiguration file to use
szMyAddressstringThe name of the server hosting the process
channelTrailerstringTrailer string to append on channel names
Returns
Initialize(string[], string, string)
Initialize the instance using a set of key=value pairs
OPERATION_RESULT Initialize(string[] arrayParams, string szMyAddress = null, string channelTrailer = null)
Parameters
arrayParamsstring[]array of key=value parameters
szMyAddressstringThe name of the server hosting the process
channelTrailerstringTrailer string to append on channel names
Returns
OnChangedState(DDM_INSTANCE_STATE)
The state has changed
void OnChangedState(DDM_INSTANCE_STATE newState)
Parameters
newStateDDM_INSTANCE_STATENew state
OnChangingState(DDM_INSTANCE_STATE, DDM_INSTANCE_STATE)
The state is starting to change
void OnChangingState(DDM_INSTANCE_STATE oldState, DDM_INSTANCE_STATE newState)
Parameters
oldStateDDM_INSTANCE_STATEOld state
newStateDDM_INSTANCE_STATENew state
OnClusterStateChange(DDM_CLUSTEREVENT, long)
The cluster has changed its state
void OnClusterStateChange(DDM_CLUSTEREVENT change, long serverid)
Parameters
changeDDM_CLUSTEREVENTNew cluster event
serveridlongServer has emitted event
OnCompletelyDisconnected(string, string)
Called when a critical condition disconnects the instance from the server
void OnCompletelyDisconnected(string channelName, string reason)
Parameters
OnConfiguration(string, string, string)
Called when a configuration parameter shall be checked
string OnConfiguration(string channelName, string key, string value)
Parameters
channelNamestringThe channel requesting. null for global parameters
keystringThe parameter key
valuestringThe parameter value
Returns
- string
The new value associated to the
key
OnFirstStateChange(DDM_INSTANCE_STATE)
Called the first time there is state change
void OnFirstStateChange(DDM_INSTANCE_STATE newState)
Parameters
newStateDDM_INSTANCE_STATENew state
OnLogging(DDM_LOG_LEVEL, string, string, string)
Called when a log is emitted
void OnLogging(DDM_LOG_LEVEL level, string source, string function, string errStr)
Parameters
levelDDM_LOG_LEVELLog level
sourcestringThe source of the log
functionstringThe function
errStrstringThe log string
OnMultiplePrimary(long, long)
There are multiple primary server in the cluster
void OnMultiplePrimary(long myId, long otherId)
Parameters
OnRequestedState(IntPtr, IntPtr)
Called when a state transfer was requested
void OnRequestedState(IntPtr buffer, IntPtr len)
Parameters
OnStateChange(DDM_INSTANCE_STATE, DDM_INSTANCE_STATE)
My state has changed
void OnStateChange(DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)
Parameters
newStateDDM_INSTANCE_STATENew state
oldStateDDM_INSTANCE_STATEOld state
OnStateReady(IntPtr, long)
The state is ready to be used
void OnStateReady(IntPtr buffer, long len)
Parameters
RequestMastershipManager(IConfiguration, string)
Request to allocate mastership manager
OPERATION_RESULT RequestMastershipManager(IConfiguration parameters = null, string serverName = null)
Parameters
parametersIConfigurationThe configuration coming from an instance of IConfiguration
serverNamestringThe server name
Returns
RequestMastershipManager(string[], string)
Request to allocate mastership manager
OPERATION_RESULT RequestMastershipManager(string[] parameters, string serverName = null)
Parameters
Returns
SetParameter(DDM_GENERAL_PARAMETER, string)
Set global parameter
void SetParameter(DDM_GENERAL_PARAMETER paramId, string paramValue)
Parameters
paramIdDDM_GENERAL_PARAMETERDDM_GENERAL_PARAMETER parameter to set
paramValuestringValue to set
SetParameter(string, string)
Set global parameter
void SetParameter(string paramName, string paramValue)
Parameters
Start(uint)
Starts the manager
OPERATION_RESULT Start(uint timeout)
Parameters
timeoutuintTimeout in ms
Returns
Stop(uint)
Stops the manager
OPERATION_RESULT Stop(uint timeout)
Parameters
timeoutuintTimeout in ms
Returns
Events
ChangedStateEvent
The state has changed
event EventHandler<ChangedStateEventArgs> ChangedStateEvent
Event Type
ChangingStateEvent
The state is starting to change
event EventHandler<ChangingStateEventArgs> ChangingStateEvent
Event Type
ClusterStateChangeEvent
The cluster has changed its state
event EventHandler<ClusterStateChangeEventArgs> ClusterStateChangeEvent
Event Type
CompletelyDisconnectedEvent
Event received when subsystem detects a complete disconnection from central server or other peers
event EventHandler<CompletelyDisconnectedEventArgs> CompletelyDisconnectedEvent
Event Type
ConfigurationEvent
Event received during configuration parameter load on subsystem
event EventHandler<ConfigurationEventArgs> ConfigurationEvent
Event Type
FirstStateChangeEvent
Called the first time there is state change
event EventHandler<FirstStateChangeEventArgs> FirstStateChangeEvent
Event Type
LoggingEvent
Event received when a log is received from subsystem
event EventHandler<LoggingEventArgs> LoggingEvent
Event Type
MultiplePrimaryEvent
There are multiple primary server in the cluster
event EventHandler<MultiplePrimaryEventArgs> MultiplePrimaryEvent
Event Type
RequestedStateEvent
Called when a state transfer was requested
event EventHandler<RequestedStateEventArgs> RequestedStateEvent
Event Type
StateChangeEvent
My state has changed
event EventHandler<StateChangeEventArgs> StateChangeEvent
Event Type
StateReadyEvent
The state is ready to be used
event EventHandler<StateReadyEventArgs> StateReadyEvent