Interface ISmartDataDistributionMastership
-
public interface ISmartDataDistributionMastership
Interface to manage undrlying mastersip manager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
ChangeMyState(DDM_INSTANCE_STATE newState)
Change the state of this instancevoid
ChangeState(long instanceId, DDM_INSTANCE_STATE newState)
Change the state of the instance with instanceIdjava.util.HashMap<java.lang.Long,ClusterHealthElement>
getClusterHealth()
Health of the clusterjava.util.HashMap<java.lang.Long,DDM_INSTANCE_STATE>
getClusterState()
State of the clusterboolean
getIamNextPrimary()
Verify if this server will be elected as next primarylong
getLocalServerId()
Get my server identifierlong
getMessageDelay()
Gets actual message delay in the clusterDDM_INSTANCE_STATE
getMyState()
Get myDDM_INSTANCE_STATE
statejava.lang.String
GetParameter(java.lang.String paramName)
Get mastership parameterlong
getPrimaryServerId()
Gets identifier of the primary serverlong
getUpTime()
Gets this instance uptimeboolean
RequestIAmNextPrimary()
Request to be the next primary servervoid
SetParameter(java.lang.String paramName, java.lang.String paramValue)
Set mastership parameterOPERATION_RESULT
Start(int dwMilliseconds)
Starts the managerOPERATION_RESULT
Stop(int dwMilliseconds)
Stops the manager
-
-
-
Method Detail
-
SetParameter
void SetParameter(java.lang.String paramName, java.lang.String paramValue)
Set mastership parameter- Parameters:
paramName
- Parameter to setparamValue
- Value to set
-
GetParameter
java.lang.String GetParameter(java.lang.String paramName)
Get mastership parameter- Parameters:
paramName
- Parameter to get- Returns:
- Parameter value
-
Start
OPERATION_RESULT Start(int dwMilliseconds)
Starts the manager- Parameters:
dwMilliseconds
- Timeout in ms- Returns:
OPERATION_RESULT
-
Stop
OPERATION_RESULT Stop(int dwMilliseconds)
Stops the manager- Parameters:
dwMilliseconds
- Timeout in ms- Returns:
OPERATION_RESULT
-
ChangeMyState
void ChangeMyState(DDM_INSTANCE_STATE newState)
Change the state of this instance- Parameters:
newState
- The newDDM_INSTANCE_STATE
state
-
ChangeState
void ChangeState(long instanceId, DDM_INSTANCE_STATE newState)
Change the state of the instance with instanceId- Parameters:
instanceId
- Instance to change statenewState
- ExpectedDDM_INSTANCE_STATE
state
-
RequestIAmNextPrimary
boolean RequestIAmNextPrimary()
Request to be the next primary server- Returns:
- True in case of success
-
getIamNextPrimary
boolean getIamNextPrimary()
Verify if this server will be elected as next primary- Returns:
- True if this server is the next primary
-
getClusterState
java.util.HashMap<java.lang.Long,DDM_INSTANCE_STATE> getClusterState()
State of the cluster- Returns:
- an
HashMap
between server id andDDM_INSTANCE_STATE
-
getClusterHealth
java.util.HashMap<java.lang.Long,ClusterHealthElement> getClusterHealth()
Health of the cluster- Returns:
- an
HashMap
between server id andClusterHealthElement
-
getMyState
DDM_INSTANCE_STATE getMyState()
Get myDDM_INSTANCE_STATE
state- Returns:
- this
DDM_INSTANCE_STATE
state
-
getLocalServerId
long getLocalServerId()
Get my server identifier- Returns:
- local identifier
-
getPrimaryServerId
long getPrimaryServerId()
Gets identifier of the primary server- Returns:
- primary identifier
-
getMessageDelay
long getMessageDelay()
Gets actual message delay in the cluster- Returns:
- message delay in the cluster
-
getUpTime
long getUpTime()
Gets this instance uptime- Returns:
- the uptime
-
-