Interface ISmartDataDistributionMastership
-
public interface ISmartDataDistributionMastershipInterface to manage undrlying mastersip manager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidChangeMyState(DDM_INSTANCE_STATE newState)Change the state of this instancevoidChangeState(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 clusterbooleangetIamNextPrimary()Verify if this server will be elected as next primarylonggetLocalServerId()Get my server identifierlonggetMessageDelay()Gets actual message delay in the clusterDDM_INSTANCE_STATEgetMyState()Get myDDM_INSTANCE_STATEstatejava.lang.StringGetParameter(java.lang.String paramName)Get mastership parameterlonggetPrimaryServerId()Gets identifier of the primary serverlonggetUpTime()Gets this instance uptimebooleanRequestIAmNextPrimary()Request to be the next primary servervoidSetParameter(java.lang.String paramName, java.lang.String paramValue)Set mastership parameterOPERATION_RESULTStart(int dwMilliseconds)Starts the managerOPERATION_RESULTStop(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_STATEstate
-
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_STATEstate
-
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
HashMapbetween server id andDDM_INSTANCE_STATE
-
getClusterHealth
java.util.HashMap<java.lang.Long,ClusterHealthElement> getClusterHealth()
Health of the cluster- Returns:
- an
HashMapbetween server id andClusterHealthElement
-
getMyState
DDM_INSTANCE_STATE getMyState()
Get myDDM_INSTANCE_STATEstate- Returns:
- this
DDM_INSTANCE_STATEstate
-
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
-
-