View Javadoc

1   /*$Id: ExecutionHistory.java,v 1.3 2004/07/26 12:07:38 nw Exp $
2    * Created on 25-May-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
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  $Log: ExecutionHistory.java,v $
56  Revision 1.3  2004/07/26 12:07:38  nw
57  renamed indirect package to protocol,
58  renamed classes and methods within protocol package
59  javadocs
60  
61  Revision 1.2  2004/07/01 11:16:22  nw
62  merged in branch
63  nww-itn06-componentization
64  
65  Revision 1.1.2.3  2004/07/01 01:42:46  nw
66  final version, before merge
67  
68  Revision 1.1.2.2  2004/06/17 09:21:23  nw
69  finished all major functionality additions to core
70  
71  Revision 1.1.2.1  2004/06/14 08:56:58  nw
72  factored applications into sub-projects,
73  got packaging of wars to work again
74  
75  Revision 1.1.2.1  2004/05/28 10:23:10  nw
76  checked in early, broken version - but it builds and tests (fail)
77   
78  */