From Web Computing Documentation
Jump to: navigation, search

interface WorkSource implements Operable, implements LogSource, implements Persistent

  • web2grid
    • web2grid.core
      • web2grid.core.iface
        • web2grid.core.iface.WorkSource

Interface overview

Implementing the WorkSource interface enables the class to be handled by the WorkSourcePool.

Public functions

getWorkUnits () : Array<WorkUnit>

Returns an array of the WorkUnits contained by the WorkSource.

start ()

Enables the WorkSource.

terminate ()

Terminates all WorkUnits in the WorkSource. If a worker has been started it will also be immediately terminated.

getNumActive () : Int

Returns the number of active WorkUnits in the WorkSource.

startOne ()

Starts an enabled WorkUnit.

terminateOne ()

Terminates a single WorkUnit. If you use the BasicWorkSource the WorkUnit started latest will be terminated.

Implemented interface functions

operate () from Operable

Administrative tasks are run at this time.

Personal tools