1
2
3
4
5
6
7
8
9
10
11 package org.astrogrid.applications.manager.persist;
12
13 import org.astrogrid.applications.Application;
14 import org.astrogrid.applications.beans.v1.cea.castor.ExecutionSummaryType;
15
16 /*** Interface to a component that records execution histories for
17 * each application.<p>
18 * maintains 'map' of executing apps (the current set) , and summary history for past executions (the archive)
19 * @author Noel Winstanley nw@jb.man.ac.uk 25-May-2004
20 */
21 public interface ExecutionHistory {
22 /*** check if an application is currently pending or executing (as compared to completed and archived).
23 * @param execID the cea-assigned id of the application to look for
24 * @return true if the application is in the current set. */
25 boolean isApplicationInCurrentSet(String execID);
26
27 /*** access an application in the current set.
28 * <p>
29 * precondition : {@link #isApplicationInCurrentSet(String)}
30 * @param execID the cea-assigned id of the application to retreive.
31 * @return the associated applicaiton
32 * @throws ExecutionIDNotFoundException if the id does not refer to an application in the current set
33 * @throws PersistenceException if a storage fault occurs.
34 */
35 Application getApplicationFromCurrentSet(String execID) throws ExecutionIDNotFoundException, PersistenceException;
36 /*** add an application to the set of currently executing apps
37 * @param app the application to add to the current set
38 * @throws PersistenceException if a storage fault occurs.*/
39 void addApplicationToCurrentSet(Application app) throws PersistenceException;
40 /*** archive an applicatioin - remove it from the set of currently executing apps, and store a summary of it in the archive
41 * @param execID cea-assigned id of the application to archive.
42 * @throws ExecutionIDNotFoundException if the id does not refer to an applicatioin in the current set
43 * @throws PersistenceException if a storage fault occurs.*/
44 void moveApplicationFromCurrentSetToArchive(String execID) throws ExecutionIDNotFoundException, PersistenceException;
45 /*** retreive a summary of an application execution from the archive
46 * @param execID the cea-assigned id of the application execution to retreive.
47 * @return the summary of this execution
48 * @throws ExecutionIDNotFoundException if the id foes not refer to an archived application
49 * @throws PersistenceException if a storage fault occurs*/
50 ExecutionSummaryType getApplicationFromArchive(String execID) throws ExecutionIDNotFoundException, PersistenceException;
51 }
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78