WorkUnit
interface WorkUnit implements Operable, implements LogSource, implements Persistent, implements AsyncResult<WorkContext>
- web2grid
- web2grid.core
- web2grid.core.iface
- web2grid.core.iface.WorkUnit
- web2grid.core.iface
- web2grid.core
Interface overview
Implementing the WorkUnit interface enables the class to be handled by the WorkUnitPool.
Public functions
start ()
Starts the WorkUnit if it's in the Passive state.
terminate ()
Terminates the WorkUnit. If a worker has been started it will be terminated immediately as well. The worker returns to the Passive state.
enable ()
Returns the WorkUnit from the Disabled state to the Passive state. The WorkUnit can be started again with the start function.
disable ()
Places the WorkUnit into the Disabled state. It cannot be started until using the enable function first.
getState () : WorkUnitState
Returns the actual state of the WorkUnit.
Implemented interface functions
operate () from Operable
isChanged () : Bool from Persistent
hxSerialize (s : haxe.Serializer) from Persistent
unSerialize (s : haxe.Unserializer) from Persistent
isCompleted () : Bool from AsyncResult
isError () from AsyncResult
getError () : String from AsyncResult
getProgress () : Float from AsyncResult
getResult () : T from AsyncResult
getElapsedTime () : Date from AsyncResult