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 CompletionServer

    java.lang.Object
      mapping.CompletionServer

All Implemented Interfaces:
  java.lang.Runnable

    public class CompletionServer

extends java.lang.Object
implements java.lang.Runnable

Author:
  Majd Kokaly This server is responsible for receiving information about completed jobs. A server (node) sends a message to this server to announce the completion of a job.

Constructor Summary
`CompletionServer(Mapper mapper)` Default constructor.

Method Summary
`Logger` | `getCompletionEventsLogger()`
`int` | `getCompletionServerPort()`
`Logger` | `getFailuresLogger()`
`Mapper` | `getMapper()`
`boolean` | `isAlive()`
`void` | `run()` This thread listen on its port to receive completion announcements.
`void` | `setAlive(boolean alive)`
`void` | `setCompletionEventsLogger(Logger completionEventsLogger)`
`void` | `setCompletionServerPort(int completionServerPort)`
`void` | `setFailuresLogger(Logger failuresLogger)`
`void` | `setMapper(Mapper mapper)`
`void` | `startServer()` This method starts the the thread.
`void` | `stopServer()` This method stops the the server and the thread.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompletionServer

    public CompletionServer(Mapper mapper)

  Default constructor.

  Parameters:
    `mapper` - to set the mapper field

Method Detail

### isAlive

    public boolean isAlive()

### setAlive

    public void setAlive(boolean alive)

### getCompletionServerPort

    public int getCompletionServerPort()

### setCompletionServerPort

    public void setCompletionServerPort(int completionServerPort)

### getMapper

    public Mapper getMapper()

### setMapper

    public void setMapper(Mapper mapper)

### getCompletionEventsLogger

    public Logger getCompletionEventsLogger()

### setCompletionEventsLogger

    public void setCompletionEventsLogger(Logger completionEventsLogger)

### getFailuresLogger

    public Logger getFailuresLogger()

### setFailuresLogger

    public void setFailuresLogger(Logger failuresLogger)

### startServer

    public void startServer()

  This method starts the the thread.

### stopServer

    public void stopServer()

  This method stops the the server and the thread.

### run

    public void run()

  This thread listen on its port to receive completion announcements. It notifies the Mapper object, unless an artifical failure has happened to the executer server. In that case the completion announcement is dropped.

  Specified by:
    `run` in interface `java.lang.Runnable`

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