WorkSource

From Web Computing Documentation
(Difference between revisions)
Jump to: navigation, search
(Public functions)
(Public functions)
Line 20: Line 20:
   
 
Returns an array of the [[WorkUnit]]s contained by the [[WorkSource]].
 
Returns an array of the [[WorkUnit]]s contained by the [[WorkSource]].
 
   
 
<div class="class_function_definition">
 
<div class="class_function_definition">
Line 26: Line 25:
 
</div>
 
</div>
   
  +
Enables the [[WorkSource]].
   
 
<div class="class_function_definition">
 
<div class="class_function_definition">
Line 31: Line 31:
 
</div>
 
</div>
   
  +
Terminates all [[WorkUnit|WorkUnits]] in the [[WorkSource]]. If a ''worker'' has been started it will also be immediately terminated.
   
 
<div class="class_function_definition">
 
<div class="class_function_definition">
Line 36: Line 37:
 
</div>
 
</div>
   
  +
Required by the [[Operable]] interface. Administrative tasks are executed at this time.
   
 
<div class="class_function_definition">
 
<div class="class_function_definition">
Line 41: Line 43:
 
</div>
 
</div>
   
  +
Returns the number of active [[WorkUnit|WorkUnits]] in the [[WorkSource]].
   
 
<div class="class_function_definition">
 
<div class="class_function_definition">
Line 46: Line 49:
 
</div>
 
</div>
   
  +
Starts an enabled [[WorkUnit]].
   
 
<div class="class_function_definition">
 
<div class="class_function_definition">
 
'''terminateOne''' ()
 
'''terminateOne''' ()
 
</div>
 
</div>
  +
  +
Terminates a single [[WorkUnit]]. If you use the [[BasicWorkSource]] the [[WorkUnit]] started latest will be terminated.

Revision as of 17:58, 11 August 2011

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