Interface ISmartDataDistribution
-
- All Known Implementing Classes:
SmartDataDistribution
public interface ISmartDataDistribution
Main interface to activate Data Distribution Manager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(IChangedStateListener listener)
Adds aIChangedStateListener
listenervoid
addListener(IChangingStateListener listener)
Adds aIChangingStateListener
listenervoid
addListener(IClusterStateChangeListener listener)
Adds aIClusterStateChangeListener
listenervoid
addListener(ICompletelyDisconnectedListener listener)
Adds aICompletelyDisconnectedListener
listenervoid
addListener(IConfigurationListener listener)
Adds aIConfigurationListener
listenervoid
addListener(IFirstStateChangeListener listener)
Adds aIFirstStateChangeListener
listenervoid
addListener(ILoggingListener listener)
Adds aILoggingListener
listenervoid
addListener(IMultiplePrimaryListener listener)
Adds aIMultiplePrimaryListener
listenervoid
addListener(IRequestedStateListener listener)
Adds aIRequestedStateListener
listenervoid
addListener(IStateChangeListener listener)
Adds aIStateChangeListener
listenervoid
addListener(IStateReadyListener listener)
Adds aIStateReadyListener
listener<T extends SmartDataDistributionChannel>
TCreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName)
<T extends SmartDataDistributionChannel>
TCreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, DDM_CHANNEL_DIRECTION direction, java.lang.String[] arrayParams)
<T extends SmartDataDistributionChannel>
TCreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, IConfiguration configuration)
<T extends SmartDataDistributionChannel>
TCreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, IConfiguration configuration, DDM_CHANNEL_DIRECTION direction)
java.lang.String
getMastershipLib()
ISmartDataDistributionMastership
getMastershipManager()
java.lang.String
GetParameter(java.lang.String paramName)
Get global parameterjava.lang.String
GetParameter(DDM_GENERAL_PARAMETER paramId)
Get global parameterjava.lang.String
getProtocol()
java.lang.String
getProtocolLib()
OPERATION_RESULT
Initialize(java.lang.String conf_file)
Initialize the instance using configuration fileOPERATION_RESULT
Initialize(java.lang.String[] arrayParams)
Initialize the instance using a set of key=value pairsOPERATION_RESULT
Initialize(java.lang.String[] arrayParams, java.lang.String topicTrailer)
Initialize the instance using a set of key=value pairsOPERATION_RESULT
Initialize(java.lang.String[] arrayParams, java.lang.String szMyAddress, java.lang.String topicTrailer)
Initialize the instance using a set of key=value pairsOPERATION_RESULT
Initialize(java.lang.String conf_file, java.lang.String topicTrailer)
Initialize the instance using configuration fileOPERATION_RESULT
Initialize(java.lang.String conf_file, java.lang.String szMyAddress, java.lang.String topicTrailer)
Initialize the instance using configuration fileOPERATION_RESULT
Initialize(IConfiguration configuration)
Initialize the instance using a configuration instanceOPERATION_RESULT
Initialize(IConfiguration configuration, java.lang.String topicTrailer)
Initialize the instance using a configuration instanceOPERATION_RESULT
Initialize(IConfiguration configuration, java.lang.String szMyAddress, java.lang.String topicTrailer)
Initialize the instance using a configuration instancevoid
OnChangedState(DDM_INSTANCE_STATE newState)
The state has changedvoid
OnChangingState(DDM_INSTANCE_STATE oldState, DDM_INSTANCE_STATE newState)
The state is starting to changevoid
OnClusterStateChange(DDM_CLUSTEREVENT change, long serverid)
The cluster has changed its statevoid
OnFirstStateChange(DDM_INSTANCE_STATE newState)
Called the first time there is state changevoid
OnMultiplePrimary(long myId, long otherId)
There are multiple primary server in the clustervoid
OnRequestedState(byte[] buffer)
Called when a state transfer was requestedvoid
OnStateChange(DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)
My state has changedvoid
OnStateReady(byte[] buffer)
The state is ready to be usedvoid
removeListener(IChangedStateListener listener)
Removes aIChangedStateListener
listenervoid
removeListener(IChangingStateListener listener)
Removes aIChangingStateListener
listenervoid
removeListener(IClusterStateChangeListener listener)
Removes aIClusterStateChangeListener
listenervoid
removeListener(ICompletelyDisconnectedListener listener)
Removes aICompletelyDisconnectedListener
listenervoid
removeListener(IConfigurationListener listener)
Removes aIConfigurationListener
listenervoid
removeListener(IFirstStateChangeListener listener)
Removes aIFirstStateChangeListener
listenervoid
removeListener(ILoggingListener listener)
Removes aILoggingListener
listenervoid
removeListener(IMultiplePrimaryListener listener)
Removes aIMultiplePrimaryListener
listenervoid
removeListener(IRequestedStateListener listener)
Removes aIRequestedStateListener
listenervoid
removeListener(IStateChangeListener listener)
Removes aIStateChangeListener
listenervoid
removeListener(IStateReadyListener listener)
Removes aIStateReadyListener
listenerOPERATION_RESULT
RequestMastershipManager()
Request to allocate mastership managerOPERATION_RESULT
RequestMastershipManager(java.lang.String serverName)
Request to allocate mastership managerOPERATION_RESULT
RequestMastershipManager(java.lang.String[] parameters)
Request to allocate mastership managerOPERATION_RESULT
RequestMastershipManager(java.lang.String serverName, java.lang.String[] parameters)
Request to allocate mastership managerOPERATION_RESULT
RequestMastershipManager(java.lang.String serverName, IConfiguration parameters)
Request to allocate mastership managerOPERATION_RESULT
RequestMastershipManager(IConfiguration parameters)
Request to allocate mastership managervoid
SetParameter(java.lang.String paramName, java.lang.String paramValue)
Set global parametervoid
SetParameter(DDM_GENERAL_PARAMETER paramId, java.lang.String paramValue)
Set global parameterOPERATION_RESULT
Start(int timeout)
Starts the managerOPERATION_RESULT
Stop(int timeout)
Stops the manager
-
-
-
Method Detail
-
Initialize
OPERATION_RESULT Initialize(java.lang.String conf_file)
Initialize the instance using configuration file- Parameters:
conf_file
- Configuration file to use- Returns:
OPERATION_RESULT
-
Initialize
OPERATION_RESULT Initialize(java.lang.String conf_file, java.lang.String topicTrailer)
Initialize the instance using configuration file- Parameters:
conf_file
- Configuration file to usetopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
-
Initialize
OPERATION_RESULT Initialize(java.lang.String conf_file, java.lang.String szMyAddress, java.lang.String topicTrailer)
Initialize the instance using configuration file- Parameters:
conf_file
- Configuration file to useszMyAddress
- The name of the server hosting the processtopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
-
Initialize
OPERATION_RESULT Initialize(IConfiguration configuration) throws java.lang.IllegalArgumentException
Initialize the instance using a configuration instance- Parameters:
configuration
- The configuration coming from an instance ofIConfiguration
- Returns:
OPERATION_RESULT
- Throws:
java.lang.IllegalArgumentException
- @seeIConfiguration
-
Initialize
OPERATION_RESULT Initialize(IConfiguration configuration, java.lang.String topicTrailer) throws java.lang.IllegalArgumentException
Initialize the instance using a configuration instance- Parameters:
configuration
- The configuration coming from an instance ofIConfiguration
topicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
- Throws:
java.lang.IllegalArgumentException
- @seeIConfiguration
-
Initialize
OPERATION_RESULT Initialize(IConfiguration configuration, java.lang.String szMyAddress, java.lang.String topicTrailer) throws java.lang.IllegalArgumentException
Initialize the instance using a configuration instance- Parameters:
configuration
- The configuration coming from an instance ofIConfiguration
szMyAddress
- The name of the server hosting the processtopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
- Throws:
java.lang.IllegalArgumentException
- @seeIConfiguration
-
Initialize
OPERATION_RESULT Initialize(java.lang.String[] arrayParams)
Initialize the instance using a set of key=value pairs- Parameters:
arrayParams
- array of key=value parameters- Returns:
OPERATION_RESULT
-
Initialize
OPERATION_RESULT Initialize(java.lang.String[] arrayParams, java.lang.String topicTrailer)
Initialize the instance using a set of key=value pairs- Parameters:
arrayParams
- array of key=value parameterstopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
-
Initialize
OPERATION_RESULT Initialize(java.lang.String[] arrayParams, java.lang.String szMyAddress, java.lang.String topicTrailer)
Initialize the instance using a set of key=value pairs- Parameters:
arrayParams
- array of key=value parametersszMyAddress
- The name of the server hosting the processtopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
-
RequestMastershipManager
OPERATION_RESULT RequestMastershipManager()
Request to allocate mastership manager- Returns:
OPERATION_RESULT
-
RequestMastershipManager
OPERATION_RESULT RequestMastershipManager(java.lang.String[] parameters)
Request to allocate mastership manager- Parameters:
parameters
- Paramaters to send to underlying layer- Returns:
OPERATION_RESULT
-
RequestMastershipManager
OPERATION_RESULT RequestMastershipManager(IConfiguration parameters)
Request to allocate mastership manager- Parameters:
parameters
-IConfiguration
instance of parameters to send to underlying layer- Returns:
OPERATION_RESULT
-
RequestMastershipManager
OPERATION_RESULT RequestMastershipManager(java.lang.String serverName)
Request to allocate mastership manager- Parameters:
serverName
- The server name- Returns:
OPERATION_RESULT
-
RequestMastershipManager
OPERATION_RESULT RequestMastershipManager(java.lang.String serverName, IConfiguration parameters)
Request to allocate mastership manager- Parameters:
serverName
- The server nameparameters
-IConfiguration
instance of parameters to send to underlying layer- Returns:
OPERATION_RESULT
-
RequestMastershipManager
OPERATION_RESULT RequestMastershipManager(java.lang.String serverName, java.lang.String[] parameters)
Request to allocate mastership manager- Parameters:
serverName
- The server nameparameters
- Paramaters to send to underlying layer- Returns:
OPERATION_RESULT
-
getMastershipManager
ISmartDataDistributionMastership getMastershipManager()
- Returns:
- Returns
ISmartDataDistributionMastership
-
Start
OPERATION_RESULT Start(int timeout)
Starts the manager- Parameters:
timeout
- Timeout in ms- Returns:
OPERATION_RESULT
-
Stop
OPERATION_RESULT Stop(int timeout)
Stops the manager- Parameters:
timeout
- Timeout in ms- Returns:
OPERATION_RESULT
-
getProtocol
java.lang.String getProtocol()
- Returns:
- Return the protocol in use
-
getProtocolLib
java.lang.String getProtocolLib()
- Returns:
- Return the protocol library in use
-
getMastershipLib
java.lang.String getMastershipLib()
- Returns:
- Return the mastership library in use
-
SetParameter
void SetParameter(java.lang.String paramName, java.lang.String paramValue)
Set global parameter- Parameters:
paramName
- Parameter name to setparamValue
- Parameter value to set
-
SetParameter
void SetParameter(DDM_GENERAL_PARAMETER paramId, java.lang.String paramValue)
Set global parameter- Parameters:
paramId
- ParameterDDM_GENERAL_PARAMETER
to setparamValue
- Parameter value to set
-
GetParameter
java.lang.String GetParameter(java.lang.String paramName)
Get global parameter- Parameters:
paramName
- Parameter name to get- Returns:
- Parameter value
-
GetParameter
java.lang.String GetParameter(DDM_GENERAL_PARAMETER paramId)
Get global parameter- Parameters:
paramId
- ParameterDDM_GENERAL_PARAMETER
to get- Returns:
- Parameter value
-
CreateSmartChannel
<T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName) throws java.lang.Throwable
- Type Parameters:
T
- The class extendingSmartDataDistributionChannel
- Parameters:
clazz
- The class to be instantiatedchannelName
- The channel name- Returns:
- The allocated instance
- Throws:
java.lang.Throwable
- generic exception for all errors (if subsystem was unable to create a channel the exception is a genericException
)
-
CreateSmartChannel
<T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, IConfiguration configuration) throws java.lang.Throwable
- Type Parameters:
T
- The class extendingSmartDataDistributionChannel
- Parameters:
clazz
- The class to be instantiatedchannelName
- The channel nameconfiguration
- The configuration coming from an instance ofIConfiguration
- Returns:
- The allocated instance
- Throws:
java.lang.Throwable
- generic exception for all errors (if subsystem was unable to create a channel the exception is a genericException
)
-
CreateSmartChannel
<T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, IConfiguration configuration, DDM_CHANNEL_DIRECTION direction) throws java.lang.Throwable
- Type Parameters:
T
- The class extendingSmartDataDistributionChannel
- Parameters:
clazz
- The class to be instantiatedchannelName
- The channel namedirection
- TheDDM_CHANNEL_DIRECTION
of the channelconfiguration
- The configuration coming from an instance ofIConfiguration
- Returns:
- The allocated instance
- Throws:
java.lang.Throwable
- generic exception for all errors (if subsystem was unable to create a channel the exception is a genericException
)
-
CreateSmartChannel
<T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, DDM_CHANNEL_DIRECTION direction, java.lang.String[] arrayParams) throws java.lang.Throwable
- Type Parameters:
T
- The class extendingSmartDataDistributionChannel
- Parameters:
clazz
- The class to be instantiatedchannelName
- The channel namedirection
- TheDDM_CHANNEL_DIRECTION
of the channelarrayParams
- Specific parameters which override main parameters- Returns:
- The allocated instance
- Throws:
java.lang.Throwable
- generic exception for all errors (if subsystem was unable to create a channel the exception is a genericException
)
-
addListener
void addListener(IConfigurationListener listener)
Adds aIConfigurationListener
listener- Parameters:
listener
-IConfigurationListener
listener to add
-
removeListener
void removeListener(IConfigurationListener listener)
Removes aIConfigurationListener
listener- Parameters:
listener
-IConfigurationListener
listener to remove
-
addListener
void addListener(ILoggingListener listener)
Adds aILoggingListener
listener- Parameters:
listener
-ILoggingListener
listener to add
-
removeListener
void removeListener(ILoggingListener listener)
Removes aILoggingListener
listener- Parameters:
listener
-ILoggingListener
listener to remove
-
addListener
void addListener(ICompletelyDisconnectedListener listener)
Adds aICompletelyDisconnectedListener
listener- Parameters:
listener
-ICompletelyDisconnectedListener
listener to add
-
removeListener
void removeListener(ICompletelyDisconnectedListener listener)
Removes aICompletelyDisconnectedListener
listener- Parameters:
listener
-ICompletelyDisconnectedListener
listener to remove
-
addListener
void addListener(IClusterStateChangeListener listener)
Adds aIClusterStateChangeListener
listener- Parameters:
listener
-IClusterStateChangeListener
listener to add
-
removeListener
void removeListener(IClusterStateChangeListener listener)
Removes aIClusterStateChangeListener
listener- Parameters:
listener
-IClusterStateChangeListener
listener to remove
-
OnClusterStateChange
void OnClusterStateChange(DDM_CLUSTEREVENT change, long serverid)
The cluster has changed its state- Parameters:
change
- New cluster eventserverid
- Server has emitted event
-
addListener
void addListener(IStateChangeListener listener)
Adds aIStateChangeListener
listener- Parameters:
listener
-IStateChangeListener
listener to add
-
removeListener
void removeListener(IStateChangeListener listener)
Removes aIStateChangeListener
listener- Parameters:
listener
-IStateChangeListener
listener to remove
-
OnStateChange
void OnStateChange(DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)
My state has changed- Parameters:
newState
- New stateoldState
- Old state
-
addListener
void addListener(IStateReadyListener listener)
Adds aIStateReadyListener
listener- Parameters:
listener
-IStateReadyListener
listener to add
-
removeListener
void removeListener(IStateReadyListener listener)
Removes aIStateReadyListener
listener- Parameters:
listener
-IStateReadyListener
listener to remove
-
OnStateReady
void OnStateReady(byte[] buffer)
The state is ready to be used- Parameters:
buffer
- The buffer state receiver
-
addListener
void addListener(IRequestedStateListener listener)
Adds aIRequestedStateListener
listener- Parameters:
listener
-IRequestedStateListener
listener to add
-
removeListener
void removeListener(IRequestedStateListener listener)
Removes aIRequestedStateListener
listener- Parameters:
listener
-IRequestedStateListener
listener to remove
-
OnRequestedState
void OnRequestedState(byte[] buffer)
Called when a state transfer was requested- Parameters:
buffer
- Pointer to the buffer
-
addListener
void addListener(IMultiplePrimaryListener listener)
Adds aIMultiplePrimaryListener
listener- Parameters:
listener
-IMultiplePrimaryListener
listener to add
-
removeListener
void removeListener(IMultiplePrimaryListener listener)
Removes aIMultiplePrimaryListener
listener- Parameters:
listener
-IMultiplePrimaryListener
listener to remove
-
OnMultiplePrimary
void OnMultiplePrimary(long myId, long otherId)
There are multiple primary server in the cluster- Parameters:
myId
- My identifierotherId
- Other identifier which is primary
-
addListener
void addListener(IFirstStateChangeListener listener)
Adds aIFirstStateChangeListener
listener- Parameters:
listener
-IFirstStateChangeListener
listener to add
-
removeListener
void removeListener(IFirstStateChangeListener listener)
Removes aIFirstStateChangeListener
listener- Parameters:
listener
-IFirstStateChangeListener
listener to remove
-
OnFirstStateChange
void OnFirstStateChange(DDM_INSTANCE_STATE newState)
Called the first time there is state change- Parameters:
newState
- New state
-
addListener
void addListener(IChangingStateListener listener)
Adds aIChangingStateListener
listener- Parameters:
listener
-IChangingStateListener
listener to add
-
removeListener
void removeListener(IChangingStateListener listener)
Removes aIChangingStateListener
listener- Parameters:
listener
-IChangingStateListener
listener to remove
-
OnChangingState
void OnChangingState(DDM_INSTANCE_STATE oldState, DDM_INSTANCE_STATE newState)
The state is starting to change- Parameters:
oldState
- Old statenewState
- New state
-
addListener
void addListener(IChangedStateListener listener)
Adds aIChangedStateListener
listener- Parameters:
listener
-IChangedStateListener
listener to add
-
removeListener
void removeListener(IChangedStateListener listener)
Removes aIChangedStateListener
listener- Parameters:
listener
-IChangedStateListener
listener to remove
-
OnChangedState
void OnChangedState(DDM_INSTANCE_STATE newState)
The state has changed- Parameters:
newState
- New state
-
-