Bugzilla – Bug 4110
Clarify at what point the JobOperator.stop returns (and maybe start/restart?)
Last modified: 2013-01-16 23:04:52 UTC
Reading into the return types of stop/start/restart... it's clear that you expect them to work asynchronously to the actual stop/start/restart.
E.g. if you expected stop() to block until the job was stopped, you'd have some kind of return code indicator. And start/restart are clearly supposed to return once the execution id has been assigned.
So I'm calling this minor but I think it would help to spell it out a bit more... knowing that a method is asynchronous in any manner is one of the most important things to know about it. I think it could even be in the Javadoc as you've started describing it there..
I will clarify in the spec. I will start here:
JobOperator.stop is a non-blocking operation. It returns after the stop directive has been queued up for processing by the batch container. JobOperator.stop does not indicate whether or not the job has actually stopped. That is known only by querying job status.
The processing of the queued element should start an asynchronous unit of execution (e.g. executor thread) that carries out the stop request by invoking the batchlet's stop method and then by interrupting the thread.
This is clearly documented in 7.8.10 JobOperator.