WorkSource
From Web Computing Documentation
(Difference between revisions)
(→Public functions) |
(→Public functions) |
||
(One intermediate revision by one user not shown) | |||
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"> |
||
− | '''operate''' () |
+ | '''getNumActive''' () : Int |
</div> |
</div> |
||
+ | Returns the number of active [[WorkUnit|WorkUnits]] in the [[WorkSource]]. |
||
<div class="class_function_definition"> |
<div class="class_function_definition"> |
||
− | '''getNumActive''' () : Int |
+ | '''startOne''' () |
</div> |
</div> |
||
+ | Starts an enabled [[WorkUnit]]. |
||
<div class="class_function_definition"> |
<div class="class_function_definition"> |
||
− | '''startOne''' () |
+ | '''terminateOne''' () |
</div> |
</div> |
||
+ | Terminates a single [[WorkUnit]]. If you use the [[BasicWorkSource]] the [[WorkUnit]] started latest will be terminated. |
||
+ | |||
+ | ==Implemented interface functions== |
||
<div class="class_function_definition"> |
<div class="class_function_definition"> |
||
− | '''terminateOne''' () |
+ | '''operate''' () from [[Operable]] |
</div> |
</div> |
||
+ | |||
+ | Administrative tasks are run at this time. |
Latest revision as of 10:04, 12 August 2011
interface WorkSource implements Operable, implements LogSource, implements Persistent
- web2grid
- web2grid.core
- web2grid.core.iface
- web2grid.core.iface.WorkSource
- web2grid.core.iface
- web2grid.core
[edit] Interface overview
Implementing the WorkSource interface enables the class to be handled by the WorkSourcePool.
[edit] 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.
[edit] Implemented interface functions
operate () from Operable
Administrative tasks are run at this time.