Make the cache objects used by the Action Tracking Service immutable

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22382 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-09-10 11:13:33 +00:00
parent e931342236
commit 1ee65f081a
4 changed files with 25 additions and 15 deletions

View File

@@ -388,8 +388,12 @@ public class ActionTrackingServiceImpl implements ActionTrackingService
return;
}
// Since it is, update the cancelled flag on it
details.requestCancel();
// Create a new copy of the details, this time with
// the cancel flag set
details = new ExecutionDetails(
details.getExecutionSummary(), details.getPersistedActionRef(),
details.getRunningOn(), details.getStartedAt(), true
);
// Save the flag to the cache
executingActionsCache.put(actionKey, details);