Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mapping
Class MappingScheme

    java.lang.Object
      mapping.MappingScheme

Direct Known Subclasses:
  FCFS_MS, Gcu_MS, LPAS_DG_MS, MET_MS, NREP_MS, SLQ_MS

    public abstract class MappingScheme

extends java.lang.Object

To add a mapping scheme, A concrete class that extend this abstract class, thus it must implement the methods of this class. This class determines what services should the concrete class provides to the Mapper objects.

Author:
  Majd Kokaly

Constructor Summary
`MappingScheme(Mapper mapper)` A default constructor

Method Summary
`java.lang.String` | `getDescription()`
`Mapper` | `getMapper()`
`abstract void` | `handleJobTimeOut(long jobID)` The implementation of this method determines what should happen a job times out.
`abstract void` | `serverIsDown(int serverID)` The implementation of this method determines what should happen a server goes down.
`abstract void` | `serverIsUp(int serverID)` The implementation of this method determines what should happen a server becomes up.
`void` | `setDescription(java.lang.String description)`
`void` | `setMapper(Mapper mapper)`
`abstract void` | `startMappingScheme()` This method is invoked after the servers and the job classes are defined.
`abstract 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 java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MappingScheme

    public MappingScheme(Mapper mapper)

  A default constructor

  Parameters:
    `mapper` - to set the mapper field.

Method Detail

### getDescription

    public java.lang.String getDescription()

### setDescription

    public void setDescription(java.lang.String description)

### getMapper

    public Mapper getMapper()

### setMapper

    public void setMapper(Mapper mapper)

### startMappingScheme

    public abstract void startMappingScheme()

  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.

### stopMappingScheme

    public abstract void stopMappingScheme()

  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.

### handleJobTimeOut

    public abstract void handleJobTimeOut(long jobID)

  The implementation of this method determines what should happen a job times out. One way of handling a time-out for instance, is to resubmit the timed-out job. This way was chosen for the implemented schemes.

  Parameters:
    `jobID` -

### serverIsDown

    public abstract void serverIsDown(int serverID)

  The implementation of this method determines what should happen a server goes down. For instance, the LPAS_DG policy resolves the LP allocation.

  Parameters:
    `serverID` - the serverID of the server that became unavailable

### serverIsUp

    public abstract void serverIsUp(int serverID)

  The implementation of this method determines what should happen a server becomes up. For instance, the LPAS_DG policy resolves the LP allocation.

  Parameters:
    `serverID` - the serverID of the server that became unavailable

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD