p2pMapReduce.nodeModule
Class BackupJobManager
java.lang.Object
p2pMapReduce.nodeModule.nodeFsm.FSM
p2pMapReduce.nodeModule.BackupJobManager
- All Implemented Interfaces:
- java.lang.Runnable
public class BackupJobManager
- extends FSM
- implements java.lang.Runnable
Acts as a backup of a job.
Receives the job update from the primary and updates the backup state.
When the primary seems failed starts the election algorithm with others
backup job manager.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BackupJobManager
public BackupJobManager(NodeFSM nodeFSM,
BackupJob managedBackupJob)
primaryMasterFailure
public void primaryMasterFailure(java.lang.String primaryID)
primaryElectionMessage
public void primaryElectionMessage(java.lang.String jobID,
java.lang.String senderID,
double senderLoad)
primaryUpdate
public void primaryUpdate(java.lang.String jobID,
java.lang.String updatedPrimaryID,
double updatedPrimaryLoad)
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
start
public void start()
stop
public void stop()
getPrimaryID
public java.lang.String getPrimaryID()
setPrimaryID
public void setPrimaryID(java.lang.String primaryNodeID)