01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file ../GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15: package org.griphyn.vdl.dbschema;
16:
17: import java.sql.SQLException;
18: import org.griphyn.vdl.invocation.InvocationRecord;
19: import java.net.InetAddress;
20: import java.util.Date;
21:
22: /**
23: * This interface defines a common base for all database schemas that
24: * supports the handling of the provenance tracking catalog. It exists
25: * primarily for grouping purposes.<p>
26: *
27: * For the moment, we are happy to be able to store things inside. The
28: * rest, in form of more required methods, comes later.
29: *
30: * @author Jens-S. Vöckler
31: * @author Yong Zhao
32: * @version $Revision: 83 $
33: */
34: public interface PTC extends Catalog {
35: /**
36: * Names the property key prefix employed for schemas dealing with the PTC.
37: */
38: public static final String PROPERTY_PREFIX = "pegasus.catalog.provenance.db.schema";
39:
40: /**
41: * Checks the existence of an invocation record in the database.
42: * The information is based on the (start,host,pid) tuple, although
43: * with private networks, cases may arise that have this tuple
44: * identical, yet are different.
45: *
46: * @param start is the start time of the grid launcher
47: * @param host is the address of the host it ran upon
48: * @param pid is the process id of the grid launcher itself.
49: * @return the id of the existing record, or -1
50: */
51: public long getInvocationID(Date start, InetAddress host, int pid)
52: throws SQLException;
53:
54: /**
55: * Inserts an invocation record into the database.
56: *
57: * @param ivr is the invocation record to store.
58: * @return true, if insertion was successful, false otherwise.
59: */
60: public boolean saveInvocation(InvocationRecord ivr)
61: throws SQLException;
62: }
|