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

## org.tiling.computefarm
Class AbstractJob

    java.lang.Object
      org.tiling.computefarm.AbstractJob

All Implemented Interfaces:
  Job

public abstract class AbstractJob
extends java.lang.Object
implements Job

An `AbstractJob` is a `Job` that provides some default implementation and a few convenience methods for implementors of `Job`.

Constructor Summary
`AbstractJob()`

Method Summary
`abstract void` | `collectResults(net.jini.space.JavaSpace javaSpace)` When this method is invoked by the framework, the implementation of `Job` should take instances of `ResultEntry` from the supplied `JavaSpace` which have the same job ID as this `Job`.
`abstract void` | `generateTasks(net.jini.space.JavaSpace javaSpace)` When this method is invoked by the framework, the implementation of `Job` should create instances of `TaskEntry` and write them to the supplied `JavaSpace`.
`net.jini.id.Uuid` | `getId()`
`protected void` | `sendReloadClassesSignal(net.jini.space.JavaSpace javaSpace)` A convenience method for signalling all `Worker`s that they should reload their classes.
`protected java.io.Serializable` | `takeResult(net.jini.space.JavaSpace javaSpace)` A convenience method taking results from the given JavaSpace.
`protected void` | `writeTask(net.jini.space.JavaSpace javaSpace, Task task)` A convenience method for writing the given task to the given JavaSpace.

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

Constructor Detail

### AbstractJob

    public AbstractJob()

Method Detail

### getId

    public net.jini.id.Uuid getId()

  Specified by:
    `getId` in interface `Job`
  Returns:
    the globally unique identifier for this `Job`.

### generateTasks

    public abstract void generateTasks(net.jini.space.JavaSpace javaSpace)

  Description copied from interface: `Job`
  When this method is invoked by the framework, the implementation of `Job` should create instances of `TaskEntry` and write them to the supplied `JavaSpace`.

  Specified by:
    `generateTasks` in interface `Job`
  Parameters:
    `javaSpace` -

### collectResults

    public abstract void collectResults(net.jini.space.JavaSpace javaSpace)

  Description copied from interface: `Job`
  When this method is invoked by the framework, the implementation of `Job` should take instances of `ResultEntry` from the supplied `JavaSpace` which have the same job ID as this `Job`.

  Specified by:
    `collectResults` in interface `Job`
  Parameters:
    `javaSpace` -

### writeTask

    protected void writeTask(net.jini.space.JavaSpace javaSpace,
                             Task task)

  A convenience method for writing the given task to the given JavaSpace. Exceptions are logged but otherwise ignored.

  Parameters:
    `javaSpace` - the JavaSpace that this `Job` is using
    `task` - the task to be written to the JavaSpace

### takeResult

    protected java.io.Serializable takeResult(net.jini.space.JavaSpace javaSpace)

  A convenience method taking results from the given JavaSpace. Exceptions are logged but otherwise ignored.

  Parameters:
    `javaSpace` - the JavaSpace that this `Job` is using
  Returns:
    a matching result

### sendReloadClassesSignal

    protected void sendReloadClassesSignal(net.jini.space.JavaSpace javaSpace)

  A convenience method for signalling all `Worker`s that they should reload their classes. Exceptions are logged but otherwise ignored.

  Parameters:
    `javaSpace` - the JavaSpace that this `Job` is using

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

Copyright © -2004 . All Rights Reserved.