ActionTrackingService work

Initial cancel support, and some duplicate instance work (mostly updating tests to handle it coming along). Duplicate id assignment work still remains


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21340 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-07-21 15:49:19 +00:00
parent 0442d3564d
commit 17bcf56a93
6 changed files with 156 additions and 20 deletions

View File

@@ -18,11 +18,23 @@
*/
package org.alfresco.service.cmr.action;
import org.alfresco.repo.action.ActionCancelledException;
import org.alfresco.repo.action.executer.ActionExecuter;
/**
* A marker interface that forms part of the Cancel Action contract.
* An action that implements this interface commits to periodically
* asking the {@link ActionService} if a cancel of it has been
* requested, and orderly terminating itself if so.
* asking the {@link ActionTrackingService} if a cancel of it has
* been requested, and orderly terminating itself if so.
*
* Actions implementing this should, via their
* {@link ActionExecuter}, periodically call
* {@link ActionTrackingService#isCancellationRequested(CancellableAction)}
* to check if a cancel has been requested for them.
* If it has, they should tidy up as much as possible, and then throw
* a {@link ActionCancelledException} to indicate to the
* {@link ActionService} that they ceased running due to a
* cancel.
*
* @author Nick Burch
*/