WorkUnitPool

From Web Computing Documentation
Jump to: navigation, search

class WorkUnitPool implements Operable, implements Persistent

  • web2grid
    • web2grid.core
      • web2grid.core.work
        • web2grid.core.work.WorkUnitPool

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.

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.

Implemented interface functions

operate () from Operable


isChanged () : Bool from Persistent

hxSerialize (s : haxe.Serializer) from Persistent

unSerialize (s : haxe.Unserializer) from Persistent

Personal tools
Modules