mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user