WorkUnitPool
(→Public functions) |
(→Public functions) |
||
Line 76: | Line 76: | ||
</div> |
</div> |
||
− | Returns a list of all [[WorkUnit|WorkUnits]]. |
+ | Returns a list of all [[WorkUnit|WorkUnits]] within the pool. |
==Implemented interface functions== |
==Implemented interface functions== |
Latest revision as of 21:14, 15 August 2011
class WorkUnitPool implements Operable, implements Persistent
- web2grid
- web2grid.core
- web2grid.core.work
- web2grid.core.work.WorkUnitPool
- web2grid.core.work
- web2grid.core
[edit] Class overview
WorkUnitPool is responsible for keeping track of WorkUnits. It operates them and manages their state according to predefined rules. It holds the WorkUnit references in a FIFO list.
[edit] Public functions
new ()
add (work : WorkUnit)
work A WorkUnit object.
Adds the WorkUnit to the end of the list.
addFirst (work : WorkUnit)
work A WorkUnit object.
Adds the WorkUnit to the beginning of the list.
startOne ()
Starts the first WorkUnit in the list.
terminateOne ()
Terminates the last active WorkUnit in the list.
terminateAll () Int
Terminates all WorkUnits.
getNumPassive () : Int
Returns the number of passive WorkUnits.
getNumActive () : Int
Returns the number of activeWorkUnits.
getCompleted () : Array<WorkUnit>
Returns the number of completed WorkUnits.
getWorkUnits () : Array<WorkUnit>
Returns a list of all WorkUnits within the pool.
[edit] Implemented interface functions
operate () from Operable
isChanged () : Bool from Persistent
hxSerialize (s : haxe.Serializer) from Persistent
unSerialize (s : haxe.Unserializer) from Persistent