WorkSource

From Web Computing Documentation
Revision as of 17:58, 11 August 2011 by Admin (Talk | contribs)

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.

operate ()

Required by the Operable interface. Administrative tasks are executed at this time.

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.

Personal tools
Modules