p2pMapReduce.impl.nodeModule
Class NodeModuleImpl
java.lang.Object
p2pMapReduce.impl.nodeModule.NodeModuleImpl
- All Implemented Interfaces:
- EventListener, NodeModuleIF
public class NodeModuleImpl
- extends java.lang.Object
- implements NodeModuleIF
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeModuleImpl
public NodeModuleImpl(NetworkConfiguration nc)
throws java.io.IOException
- Throws:
java.io.IOException
getNodeInfo
public NodeInfo getNodeInfo()
- Specified by:
getNodeInfo
in interface NodeModuleIF
- Returns:
NodeInfo
instance associated to this node
getNodeFSM
public NodeFSM getNodeFSM()
- Specified by:
getNodeFSM
in interface NodeModuleIF
- Returns:
- The
NodeFSM
of this node
getNodeID
public java.lang.String getNodeID()
- Specified by:
getNodeID
in interface NodeModuleIF
- Returns:
- The id of this node
getCoordinatorID
public java.lang.String getCoordinatorID()
- Description copied from interface:
NodeModuleIF
- The id of the network coordinator
- Specified by:
getCoordinatorID
in interface NodeModuleIF
- Returns:
setCoordinatorID
public void setCoordinatorID(java.lang.String coordinatorID)
- Specified by:
setCoordinatorID
in interface NodeModuleIF
isCoordinator
public boolean isCoordinator()
- Description copied from interface:
NodeModuleIF
- Return true if this node is the Coordinator
- Specified by:
isCoordinator
in interface NodeModuleIF
- Returns:
getNetworkModule
public NetworkModuleIF getNetworkModule()
- Specified by:
getNetworkModule
in interface NodeModuleIF
- Returns:
- The
NetworkModuleIF
associated to this node
getFtpManager
public FTPManager getFtpManager()
- Specified by:
getFtpManager
in interface NodeModuleIF
- Returns:
- The
FTPManager
for this node
getFileSystemView
public FileSystemView getFileSystemView()
- Specified by:
getFileSystemView
in interface NodeModuleIF
- Returns:
- The
FileSystemView
of this node
getBackupJobList
public java.util.LinkedList<BackupJob> getBackupJobList()
- Specified by:
getBackupJobList
in interface NodeModuleIF
getPrimaryJobList
public java.util.LinkedList<PrimaryJob> getPrimaryJobList()
- Specified by:
getPrimaryJobList
in interface NodeModuleIF
getSlaveTaskMap
public java.util.HashMap<java.lang.String,SlaveTask> getSlaveTaskMap()
- Specified by:
getSlaveTaskMap
in interface NodeModuleIF
addPrimaryJob
public void addPrimaryJob(PrimaryJob pj)
- Specified by:
addPrimaryJob
in interface NodeModuleIF
removePrimaryJob
public PrimaryJob removePrimaryJob(java.lang.String jobID)
- Specified by:
removePrimaryJob
in interface NodeModuleIF
getPrimaryJob
public PrimaryJob getPrimaryJob(java.lang.String jobID)
- Specified by:
getPrimaryJob
in interface NodeModuleIF
addBackupJob
public void addBackupJob(BackupJob bj)
- Specified by:
addBackupJob
in interface NodeModuleIF
removeBackupJob
public BackupJob removeBackupJob(java.lang.String jobID)
- Specified by:
removeBackupJob
in interface NodeModuleIF
getBackupJob
public BackupJob getBackupJob(java.lang.String jobID)
- Specified by:
getBackupJob
in interface NodeModuleIF
addSlaveTask
public void addSlaveTask(SlaveTask st)
- Specified by:
addSlaveTask
in interface NodeModuleIF
removeSlaveTask
public SlaveTask removeSlaveTask(java.lang.String taskID)
- Specified by:
removeSlaveTask
in interface NodeModuleIF
getSlaveTask
public SlaveTask getSlaveTask(java.lang.String taskID)
- Specified by:
getSlaveTask
in interface NodeModuleIF
addTaskManager
public void addTaskManager(java.lang.String taskID,
TaskManager tm)
- Specified by:
addTaskManager
in interface NodeModuleIF
getTaskManager
public TaskManager getTaskManager(java.lang.String taskID)
- Specified by:
getTaskManager
in interface NodeModuleIF
removeTaskManager
public TaskManager removeTaskManager(java.lang.String taskID)
- Specified by:
removeTaskManager
in interface NodeModuleIF
handleEvent
public void handleEvent(EventIF event)
- Specified by:
handleEvent
in interface EventListener
forceTransition
public void forceTransition(NodeState.StateName stateName)
- Dangerous forcing of state transition.
Only for testing purpose, will be removed
- Parameters:
stateName
-