mapping
Class Gcu_MS

java.lang.Object
  extended by mapping.MappingScheme
      extended by mapping.Gcu_MS

public class Gcu_MS
extends MappingScheme

This is the implementation of the Gcu scheduling policy.

Author:
Majd Kokaly

Constructor Summary
Gcu_MS(Mapper mapper)
          A default constructor.
 
Method Summary
 JobsQueue[] getClassesQueues()
           
 void handleJobTimeOut(long jobID)
          Resubmit timed out jobs.
 void initQueues()
          This method initialize a queue for every job class.
 void serverIsDown(int serverID)
          The implementation of this method determines what should happen a server goes down.
 void serverIsUp(int serverID)
          The implementation of this method determines what should happen a server becomes up.
 void setClassesQueues(JobsQueue[] classesQueues)
           
 void startMappingScheme()
          This method is invoked after the servers and the job classes are defined.
 void stopMappingScheme()
          In this method, the program- mer should define operations that stop the execution of the system processes (e.g mapping and generation).
 
Methods inherited from class mapping.MappingScheme
getDescription, getMapper, setDescription, setMapper
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gcu_MS

public Gcu_MS(Mapper mapper)
A default constructor.

Parameters:
mapper - To set the mapper field.
Method Detail

getClassesQueues

public JobsQueue[] getClassesQueues()

setClassesQueues

public void setClassesQueues(JobsQueue[] classesQueues)

startMappingScheme

public void startMappingScheme()
Description copied from class: MappingScheme
This method is invoked after the servers and the job classes are defined. It is invoked before the start of the operation. In this method, initialization operations are defined. For instance, if the mapping scheme depends on a thread, the thread is initialized and started.

Specified by:
startMappingScheme in class MappingScheme
See Also:
MappingScheme.startMappingScheme()

stopMappingScheme

public void stopMappingScheme()
Description copied from class: MappingScheme
In this method, the program- mer should define operations that stop the execution of the system processes (e.g mapping and generation). This can be useful if the system execution is wished to be restarted after stopping it.

Specified by:
stopMappingScheme in class MappingScheme
See Also:
MappingScheme.stopMappingScheme()

handleJobTimeOut

public void handleJobTimeOut(long jobID)
Resubmit timed out jobs.

Specified by:
handleJobTimeOut in class MappingScheme
See Also:
MappingScheme.handleJobTimeOut(long)

serverIsDown

public void serverIsDown(int serverID)
Description copied from class: MappingScheme
The implementation of this method determines what should happen a server goes down. For instance, the LPAS_DG policy resolves the LP allocation.

Specified by:
serverIsDown in class MappingScheme
Parameters:
serverID - the serverID of the server that became unavailable
See Also:
MappingScheme.serverIsDown(int)

serverIsUp

public void serverIsUp(int serverID)
Description copied from class: MappingScheme
The implementation of this method determines what should happen a server becomes up. For instance, the LPAS_DG policy resolves the LP allocation.

Specified by:
serverIsUp in class MappingScheme
Parameters:
serverID - the serverID of the server that became unavailable
See Also:
MappingScheme.serverIsUp(int)

initQueues

public void initQueues()
This method initialize a queue for every job class.