Class SmartDataDistribution
- java.lang.Object
-
- org.mases.datadistributionmanager.SmartDataDistribution
-
- All Implemented Interfaces:
ISmartDataDistribution
public class SmartDataDistribution extends java.lang.Object implements ISmartDataDistribution
Main class to activate Data Distribution Manager
-
-
Constructor Summary
Constructors Constructor Description SmartDataDistribution()
Ctor
-
Method Summary
All Methods Instance Methods Concrete 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
listenervoid
ChangedState(long IDataDistribution_nativePtr, int newState)
Internal methodvoid
ChangingState(long IDataDistribution_nativePtr, int oldState, int newState)
Internal method<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)
void
FirstStateChange(long IDataDistribution_nativePtr, int newState)
Internal methodjava.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(long IDataDistribution_nativePtr, int change, long serverid)
Internal methodvoid
OnClusterStateChange(DDM_CLUSTEREVENT change, long serverid)
The cluster has changed its statevoid
OnCompletelyDisconnected(long IDataDistribution_nativePtr, java.lang.String channelName, java.lang.String reason)
Internal methodvoid
OnCompletelyDisconnected(java.lang.String channelName, java.lang.String reason)
java.lang.String
OnConfiguration(long IDataDistribution_nativePtr, java.lang.String channelName, java.lang.String key, java.lang.String value)
Internal methodjava.lang.String
OnConfiguration(java.lang.String channelName, java.lang.String key, java.lang.String value)
void
OnFirstStateChange(DDM_INSTANCE_STATE newState)
Called the first time there is state changevoid
OnLogging(long IDataDistribution_nativePtr, int level, java.lang.String source, java.lang.String function, java.lang.String errStr)
Internal methodvoid
OnLogging(DDM_LOG_LEVEL level, java.lang.String source, java.lang.String function, java.lang.String logStr)
void
OnMultiplePrimary(long myId, long otherId)
There are multiple primary server in the clustervoid
OnMultiplePrimary(long IDataDistribution_nativePtr, long myId, long otherId)
Internal methodvoid
OnRequestedState(byte[] buffer)
Called when a state transfer was requestedvoid
OnRequestedState(long IDataDistribution_nativePtr, byte[] buffer)
Internal methodvoid
OnStateChange(long IDataDistribution_nativePtr, int newState, int oldState)
Internal methodvoid
OnStateChange(DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)
My state has changedvoid
OnStateReady(byte[] buffer)
The state is ready to be usedvoid
OnStateReady(long IDataDistribution_nativePtr, byte[] buffer)
Internal methodvoid
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
public OPERATION_RESULT Initialize(java.lang.String conf_file)
Description copied from interface:ISmartDataDistribution
Initialize the instance using configuration file- Specified by:
Initialize
in interfaceISmartDataDistribution
- Parameters:
conf_file
- Configuration file to use- Returns:
OPERATION_RESULT
-
Initialize
public OPERATION_RESULT Initialize(java.lang.String conf_file, java.lang.String topicTrailer)
Description copied from interface:ISmartDataDistribution
Initialize the instance using configuration file- Specified by:
Initialize
in interfaceISmartDataDistribution
- Parameters:
conf_file
- Configuration file to usetopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
-
Initialize
public OPERATION_RESULT Initialize(java.lang.String conf_file, java.lang.String szMyAddress, java.lang.String topicTrailer)
Description copied from interface:ISmartDataDistribution
Initialize the instance using configuration file- Specified by:
Initialize
in interfaceISmartDataDistribution
- 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
public OPERATION_RESULT Initialize(IConfiguration configuration) throws java.lang.IllegalArgumentException
Description copied from interface:ISmartDataDistribution
Initialize the instance using a configuration instance- Specified by:
Initialize
in interfaceISmartDataDistribution
- Parameters:
configuration
- The configuration coming from an instance ofIConfiguration
- Returns:
OPERATION_RESULT
- Throws:
java.lang.IllegalArgumentException
- @seeIConfiguration
-
Initialize
public OPERATION_RESULT Initialize(IConfiguration configuration, java.lang.String topicTrailer) throws java.lang.IllegalArgumentException
Description copied from interface:ISmartDataDistribution
Initialize the instance using a configuration instance- Specified by:
Initialize
in interfaceISmartDataDistribution
- 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
public OPERATION_RESULT Initialize(IConfiguration configuration, java.lang.String szMyAddress, java.lang.String topicTrailer) throws java.lang.IllegalArgumentException
Description copied from interface:ISmartDataDistribution
Initialize the instance using a configuration instance- Specified by:
Initialize
in interfaceISmartDataDistribution
- 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
public OPERATION_RESULT Initialize(java.lang.String[] arrayParams)
Description copied from interface:ISmartDataDistribution
Initialize the instance using a set of key=value pairs- Specified by:
Initialize
in interfaceISmartDataDistribution
- Parameters:
arrayParams
- array of key=value parameters- Returns:
OPERATION_RESULT
-
Initialize
public OPERATION_RESULT Initialize(java.lang.String[] arrayParams, java.lang.String topicTrailer)
Description copied from interface:ISmartDataDistribution
Initialize the instance using a set of key=value pairs- Specified by:
Initialize
in interfaceISmartDataDistribution
- Parameters:
arrayParams
- array of key=value parameterstopicTrailer
- Trailer string to append on channel names- Returns:
OPERATION_RESULT
-
Initialize
public OPERATION_RESULT Initialize(java.lang.String[] arrayParams, java.lang.String szMyAddress, java.lang.String topicTrailer)
Description copied from interface:ISmartDataDistribution
Initialize the instance using a set of key=value pairs- Specified by:
Initialize
in interfaceISmartDataDistribution
- 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
public OPERATION_RESULT RequestMastershipManager()
Description copied from interface:ISmartDataDistribution
Request to allocate mastership manager- Specified by:
RequestMastershipManager
in interfaceISmartDataDistribution
- Returns:
OPERATION_RESULT
-
RequestMastershipManager
public OPERATION_RESULT RequestMastershipManager(java.lang.String[] parameters)
Description copied from interface:ISmartDataDistribution
Request to allocate mastership manager- Specified by:
RequestMastershipManager
in interfaceISmartDataDistribution
- Parameters:
parameters
- Paramaters to send to underlying layer- Returns:
OPERATION_RESULT
-
RequestMastershipManager
public OPERATION_RESULT RequestMastershipManager(IConfiguration parameters)
Description copied from interface:ISmartDataDistribution
Request to allocate mastership manager- Specified by:
RequestMastershipManager
in interfaceISmartDataDistribution
- Parameters:
parameters
-IConfiguration
instance of parameters to send to underlying layer- Returns:
OPERATION_RESULT
-
RequestMastershipManager
public OPERATION_RESULT RequestMastershipManager(java.lang.String serverName)
Description copied from interface:ISmartDataDistribution
Request to allocate mastership manager- Specified by:
RequestMastershipManager
in interfaceISmartDataDistribution
- Parameters:
serverName
- The server name- Returns:
OPERATION_RESULT
-
RequestMastershipManager
public OPERATION_RESULT RequestMastershipManager(java.lang.String serverName, IConfiguration parameters)
Description copied from interface:ISmartDataDistribution
Request to allocate mastership manager- Specified by:
RequestMastershipManager
in interfaceISmartDataDistribution
- Parameters:
serverName
- The server nameparameters
-IConfiguration
instance of parameters to send to underlying layer- Returns:
OPERATION_RESULT
-
RequestMastershipManager
public OPERATION_RESULT RequestMastershipManager(java.lang.String serverName, java.lang.String[] parameters)
Description copied from interface:ISmartDataDistribution
Request to allocate mastership manager- Specified by:
RequestMastershipManager
in interfaceISmartDataDistribution
- Parameters:
serverName
- The server nameparameters
- Paramaters to send to underlying layer- Returns:
OPERATION_RESULT
-
getMastershipManager
public ISmartDataDistributionMastership getMastershipManager()
- Specified by:
getMastershipManager
in interfaceISmartDataDistribution
- Returns:
- Returns
ISmartDataDistributionMastership
-
Start
public OPERATION_RESULT Start(int timeout)
Description copied from interface:ISmartDataDistribution
Starts the manager- Specified by:
Start
in interfaceISmartDataDistribution
- Parameters:
timeout
- Timeout in ms- Returns:
OPERATION_RESULT
-
Stop
public OPERATION_RESULT Stop(int timeout)
Description copied from interface:ISmartDataDistribution
Stops the manager- Specified by:
Stop
in interfaceISmartDataDistribution
- Parameters:
timeout
- Timeout in ms- Returns:
OPERATION_RESULT
-
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocol
in interfaceISmartDataDistribution
- Returns:
- Return the protocol in use
-
getProtocolLib
public java.lang.String getProtocolLib()
- Specified by:
getProtocolLib
in interfaceISmartDataDistribution
- Returns:
- Return the protocol library in use
-
getMastershipLib
public java.lang.String getMastershipLib()
- Specified by:
getMastershipLib
in interfaceISmartDataDistribution
- Returns:
- Return the mastership library in use
-
SetParameter
public void SetParameter(java.lang.String paramName, java.lang.String paramValue)
Description copied from interface:ISmartDataDistribution
Set global parameter- Specified by:
SetParameter
in interfaceISmartDataDistribution
- Parameters:
paramName
- Parameter name to setparamValue
- Parameter value to set
-
SetParameter
public void SetParameter(DDM_GENERAL_PARAMETER paramId, java.lang.String paramValue)
Description copied from interface:ISmartDataDistribution
Set global parameter- Specified by:
SetParameter
in interfaceISmartDataDistribution
- Parameters:
paramId
- ParameterDDM_GENERAL_PARAMETER
to setparamValue
- Parameter value to set
-
GetParameter
public java.lang.String GetParameter(java.lang.String paramName)
Description copied from interface:ISmartDataDistribution
Get global parameter- Specified by:
GetParameter
in interfaceISmartDataDistribution
- Parameters:
paramName
- Parameter name to get- Returns:
- Parameter value
-
GetParameter
public java.lang.String GetParameter(DDM_GENERAL_PARAMETER paramId)
Description copied from interface:ISmartDataDistribution
Get global parameter- Specified by:
GetParameter
in interfaceISmartDataDistribution
- Parameters:
paramId
- ParameterDDM_GENERAL_PARAMETER
to get- Returns:
- Parameter value
-
CreateSmartChannel
public <T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName) throws java.lang.Throwable
- Specified by:
CreateSmartChannel
in interfaceISmartDataDistribution
- 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
public <T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, IConfiguration configuration) throws java.lang.Throwable
- Specified by:
CreateSmartChannel
in interfaceISmartDataDistribution
- 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
public <T extends SmartDataDistributionChannel> T CreateSmartChannel(java.lang.Class<T> clazz, java.lang.String channelName, IConfiguration configuration, DDM_CHANNEL_DIRECTION direction) throws java.lang.Throwable
- Specified by:
CreateSmartChannel
in interfaceISmartDataDistribution
- Type Parameters:
T
- The class extendingSmartDataDistributionChannel
- Parameters:
clazz
- The class to be instantiatedchannelName
- The channel nameconfiguration
- The configuration coming from an instance ofIConfiguration
direction
- TheDDM_CHANNEL_DIRECTION
of the channel- 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
public <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
- Specified by:
CreateSmartChannel
in interfaceISmartDataDistribution
- 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
public void addListener(IConfigurationListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIConfigurationListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IConfigurationListener
listener to add
-
removeListener
public void removeListener(IConfigurationListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIConfigurationListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IConfigurationListener
listener to remove
-
OnConfiguration
public final java.lang.String OnConfiguration(long IDataDistribution_nativePtr, java.lang.String channelName, java.lang.String key, java.lang.String value)
Internal method
-
OnConfiguration
public java.lang.String OnConfiguration(java.lang.String channelName, java.lang.String key, java.lang.String value)
-
addListener
public void addListener(ILoggingListener listener)
Description copied from interface:ISmartDataDistribution
Adds aILoggingListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-ILoggingListener
listener to add
-
removeListener
public void removeListener(ILoggingListener listener)
Description copied from interface:ISmartDataDistribution
Removes aILoggingListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-ILoggingListener
listener to remove
-
OnLogging
public final void OnLogging(long IDataDistribution_nativePtr, int level, java.lang.String source, java.lang.String function, java.lang.String errStr)
Internal method
-
OnLogging
public void OnLogging(DDM_LOG_LEVEL level, java.lang.String source, java.lang.String function, java.lang.String logStr)
-
addListener
public void addListener(ICompletelyDisconnectedListener listener)
Description copied from interface:ISmartDataDistribution
Adds aICompletelyDisconnectedListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-ICompletelyDisconnectedListener
listener to add
-
removeListener
public void removeListener(ICompletelyDisconnectedListener listener)
Description copied from interface:ISmartDataDistribution
Removes aICompletelyDisconnectedListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-ICompletelyDisconnectedListener
listener to remove
-
OnCompletelyDisconnected
public final void OnCompletelyDisconnected(long IDataDistribution_nativePtr, java.lang.String channelName, java.lang.String reason)
Internal method
-
OnCompletelyDisconnected
public void OnCompletelyDisconnected(java.lang.String channelName, java.lang.String reason)
-
addListener
public void addListener(IClusterStateChangeListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIClusterStateChangeListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IClusterStateChangeListener
listener to add
-
removeListener
public void removeListener(IClusterStateChangeListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIClusterStateChangeListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IClusterStateChangeListener
listener to remove
-
OnClusterStateChange
public final void OnClusterStateChange(long IDataDistribution_nativePtr, int change, long serverid)
Internal method
-
OnClusterStateChange
public void OnClusterStateChange(DDM_CLUSTEREVENT change, long serverid)
Description copied from interface:ISmartDataDistribution
The cluster has changed its state- Specified by:
OnClusterStateChange
in interfaceISmartDataDistribution
- Parameters:
change
- New cluster eventserverid
- Server has emitted event
-
addListener
public void addListener(IStateChangeListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIStateChangeListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IStateChangeListener
listener to add
-
removeListener
public void removeListener(IStateChangeListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIStateChangeListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IStateChangeListener
listener to remove
-
OnStateChange
public final void OnStateChange(long IDataDistribution_nativePtr, int newState, int oldState)
Internal method
-
OnStateChange
public void OnStateChange(DDM_INSTANCE_STATE newState, DDM_INSTANCE_STATE oldState)
Description copied from interface:ISmartDataDistribution
My state has changed- Specified by:
OnStateChange
in interfaceISmartDataDistribution
- Parameters:
newState
- New stateoldState
- Old state
-
addListener
public void addListener(IStateReadyListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIStateReadyListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IStateReadyListener
listener to add
-
removeListener
public void removeListener(IStateReadyListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIStateReadyListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IStateReadyListener
listener to remove
-
OnStateReady
public final void OnStateReady(long IDataDistribution_nativePtr, byte[] buffer)
Internal method
-
OnStateReady
public void OnStateReady(byte[] buffer)
Description copied from interface:ISmartDataDistribution
The state is ready to be used- Specified by:
OnStateReady
in interfaceISmartDataDistribution
- Parameters:
buffer
- The buffer state receiver
-
addListener
public void addListener(IRequestedStateListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIRequestedStateListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IRequestedStateListener
listener to add
-
removeListener
public void removeListener(IRequestedStateListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIRequestedStateListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IRequestedStateListener
listener to remove
-
OnRequestedState
public final void OnRequestedState(long IDataDistribution_nativePtr, byte[] buffer)
Internal method
-
OnRequestedState
public void OnRequestedState(byte[] buffer)
Description copied from interface:ISmartDataDistribution
Called when a state transfer was requested- Specified by:
OnRequestedState
in interfaceISmartDataDistribution
- Parameters:
buffer
- Pointer to the buffer
-
addListener
public void addListener(IMultiplePrimaryListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIMultiplePrimaryListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IMultiplePrimaryListener
listener to add
-
removeListener
public void removeListener(IMultiplePrimaryListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIMultiplePrimaryListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IMultiplePrimaryListener
listener to remove
-
OnMultiplePrimary
public final void OnMultiplePrimary(long IDataDistribution_nativePtr, long myId, long otherId)
Internal method
-
OnMultiplePrimary
public void OnMultiplePrimary(long myId, long otherId)
Description copied from interface:ISmartDataDistribution
There are multiple primary server in the cluster- Specified by:
OnMultiplePrimary
in interfaceISmartDataDistribution
- Parameters:
myId
- My identifierotherId
- Other identifier which is primary
-
addListener
public void addListener(IFirstStateChangeListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIFirstStateChangeListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IFirstStateChangeListener
listener to add
-
removeListener
public void removeListener(IFirstStateChangeListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIFirstStateChangeListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IFirstStateChangeListener
listener to remove
-
FirstStateChange
public final void FirstStateChange(long IDataDistribution_nativePtr, int newState)
Internal method
-
OnFirstStateChange
public void OnFirstStateChange(DDM_INSTANCE_STATE newState)
Description copied from interface:ISmartDataDistribution
Called the first time there is state change- Specified by:
OnFirstStateChange
in interfaceISmartDataDistribution
- Parameters:
newState
- New state
-
addListener
public void addListener(IChangingStateListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIChangingStateListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IChangingStateListener
listener to add
-
removeListener
public void removeListener(IChangingStateListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIChangingStateListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IChangingStateListener
listener to remove
-
ChangingState
public final void ChangingState(long IDataDistribution_nativePtr, int oldState, int newState)
Internal method
-
OnChangingState
public void OnChangingState(DDM_INSTANCE_STATE oldState, DDM_INSTANCE_STATE newState)
Description copied from interface:ISmartDataDistribution
The state is starting to change- Specified by:
OnChangingState
in interfaceISmartDataDistribution
- Parameters:
oldState
- Old statenewState
- New state
-
addListener
public void addListener(IChangedStateListener listener)
Description copied from interface:ISmartDataDistribution
Adds aIChangedStateListener
listener- Specified by:
addListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IChangedStateListener
listener to add
-
removeListener
public void removeListener(IChangedStateListener listener)
Description copied from interface:ISmartDataDistribution
Removes aIChangedStateListener
listener- Specified by:
removeListener
in interfaceISmartDataDistribution
- Parameters:
listener
-IChangedStateListener
listener to remove
-
ChangedState
public final void ChangedState(long IDataDistribution_nativePtr, int newState)
Internal method
-
OnChangedState
public void OnChangedState(DDM_INSTANCE_STATE newState)
Description copied from interface:ISmartDataDistribution
The state has changed- Specified by:
OnChangedState
in interfaceISmartDataDistribution
- Parameters:
newState
- New state
-
-