Skip to main content

nebula::exec::task::Task

Please note that all the functions in Task class are called from the same execution context. So they are guaranteed to be called sequentially one after another. So implementation must ensure that any of the Task functions are not blocking.

class nebula::exec::task::Task

Abstract base class for all Tasks that user can define. For am executor operations, the actual user operation is defined using the Task class.

Members

public bool init()

This method is guaranteed to be called at least once before the first.

See also: run() function is called. Any one time initialization can be performed here.

  • Returns true if initialization is success

  • Returns false if initialization is not complete

public bool cleanUp()

This method is guaranteed to be called at least once after the last.

See also: run() function is called. Any cleanup operations can be performed here

  • Returns true if cleanup was success

  • Returns false if cleanup could not complete

public bool run()

This method is called every time the executor trigger is activated. (ie, timer expired, data available etc)

  • Returns true if the invocation was success

  • Returns false if the invocation couldn't finish

public inline virtual ~Task()