it.geosolutions.geobatch.flow
Interface Job

All Known Subinterfaces:
Action<XEO>, EventConsumer<EO,ECC>, FlowManager<EO,FC>
All Known Implementing Classes:
BaseAction, BaseEventConsumer

public interface Job

Anything that can be run, paused and resumed.

Author:
ETj

Method Summary
 boolean isPaused()
           
 boolean pause()
          Pause the execution of a Job.
Implementations may also completely ignore the pause() call -- for instance the job may not be split in execution steps, loop iterations and so on; in this case the pause() invocation may simply return false, indicating to the caller that the job was not paused.
 boolean pause(boolean sub)
          Pause the execution of a Job and optionally all of its subjobs.
 void resume()
          Resume a previously paused job.
 

Method Detail

pause

boolean pause()
Pause the execution of a Job.
Implementations may also completely ignore the pause() call -- for instance the job may not be split in execution steps, loop iterations and so on; in this case the pause() invocation may simply return false, indicating to the caller that the job was not paused.

Returns:
true if the Job has been successfully paused.

pause

boolean pause(boolean sub)
Pause the execution of a Job and optionally all of its subjobs.
A Job may control other subjobs running asynchronally.
When sub is true, also the subjobs will be paused.

pause(false) is equivalent to pause()

Parameters:
sub - when true, also subtasks will be paused.
Returns:
true if the Job has been successfully paused, disregarding any return values from its subjobs.

resume

void resume()
Resume a previously paused job.
If the instance does not support pausing or it was not paused, nothing will happen.


isPaused

boolean isPaused()


Copyright © 2008-2012 GeoSolutions. All Rights Reserved.