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

## pulling
Class Puller

    java.lang.Object
      pulling.Puller

    public class Puller

extends java.lang.Object

This class is responsible for managing the Puller module on every server. It is also responsible for communication with the central Mapper.

Author:
  Majd Kokaly

Constructor Summary
`Puller()`

Method Summary
`AvailabilityManager` | `getAvailabilityManager()`
`CPU_EatersLauncher` | `getCpuEater()`
`int` | `getPullerPort()`
`static void` | `main(java.lang.String[] args)` This is the main loop.
`static double[]` | `parseWeightsString(java.lang.String weightString, int n)`
`void` | `setAvailabilityManager(AvailabilityManager availabilityManager)`
`void` | `setCpuEater(CPU_EatersLauncher cpuEater)`
`void` | `setPullerPort(int pullerPort)`
`void` | `startAvailabilityManager(double systemResolution, java.lang.String mapperHostName, int mode, double[] weights, double c)` This method is invoked from the main method it initialize the Availability Manager object.
`void` | `startCPUEater(double percentage, double forHowLong)` This method start a CPU_Eater that eats a percentage of the CPU for an specific amount of time

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

Constructor Detail

### Puller

    public Puller()

Method Detail

### getAvailabilityManager

    public AvailabilityManager getAvailabilityManager()

### setAvailabilityManager

    public void setAvailabilityManager(AvailabilityManager availabilityManager)

### getCpuEater

    public CPU_EatersLauncher getCpuEater()

### setCpuEater

    public void setCpuEater(CPU_EatersLauncher cpuEater)

### getPullerPort

    public int getPullerPort()

### setPullerPort

    public void setPullerPort(int pullerPort)

### startAvailabilityManager

    public void startAvailabilityManager(double systemResolution,
                                         java.lang.String mapperHostName,
                                         int mode,
                                         double[] weights,
                                         double c)

  This method is invoked from the main method it initialize the Availability Manager object.

  Parameters:
    `systemResolution` - the system resolution. Which is the time that the Availabilbility Manager object send a new value of aj
    `mapperHostName` - it is the host name of the Mapper machine.
    `mode` - this defines the mode in which the Availability Manager works
    `weights` - is the array of weights. Please refer to the Thesis document Section Availability model.
    `c` - Please refer to the Thesis document Section Availability model.

### startCPUEater

    public void startCPUEater(double percentage,
                              double forHowLong)

  This method start a CPU_Eater that eats a percentage of the CPU for an specific amount of time

  Parameters:
    `percentage` - the percentage to be eaten from the CPU
    `forHowLong` - the time in minutes for how long for the eater to work.

### main

    public static void main(java.lang.String[] args)

  This is the main loop. The puller keeps running in an infinite loop until the Mapper module sends a kill message.

  Parameters:
    `args` -

### parseWeightsString

    public static double[] parseWeightsString(java.lang.String weightString,
                                              int n)

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