diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/jobs/IJob.java')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/jobs/IJob.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java b/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java index 3683b1f09..5584d68ff 100644 --- a/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java +++ b/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java @@ -91,4 +91,16 @@ public interface IJob { * @return configuration store */ public IConfigStore getConfigStore(); + + /** + * Request the job to stop gracefully. The job may not stop immediately. + */ + public void stop(); + + /** + * Check whether the job has been asked to stop. Long running jobs should call + * this method occasionally inside the run() method and exit gracefully if it + * returns true. + */ + public boolean isStopped(); } |