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.cPlanner.selector;
16:
17: import org.griphyn.cPlanner.classes.ADag;
18: import org.griphyn.cPlanner.classes.PegasusBag;
19:
20: import org.griphyn.cPlanner.partitioner.graph.Graph;
21:
22: import java.util.List;
23:
24: /**
25: *
26: * The interface for the Site Selector. Allows us to maps the workflows
27: * to different sites.
28: *
29: * @author Karan Vahi
30: * @author Jens-S. Vöckler
31: * @author Gaurang Mehta
32: *
33: *
34: * @version $Revision: 299 $
35: */
36: public interface SiteSelector {
37:
38: /**
39: * The version of the API of the Site Selector.
40: */
41: public static final String VERSION = "2.0";
42:
43: /**
44: * The value for the pool handle, when the pool is not found.
45: */
46: public static final String SITE_NOT_FOUND = "NONE";
47:
48: /**
49: * Initializes the site selector.
50: *
51: * @param bag the bag of objects that is useful for initialization.
52: *
53: */
54: public void initialize(PegasusBag bag);
55:
56: /**
57: * Maps the jobs in the workflow to the various grid sites.
58: * The jobs are mapped by setting the site handle for the jobs.
59: *
60: * @param workflow the workflow in a Graph form.
61: *
62: * @param sites the list of <code>String</code> objects representing the
63: * execution sites that can be used.
64: */
65: public void mapWorkflow(Graph workflow, List sites);
66:
67: /**
68: * Maps the jobs in the workflow to the various grid sites.
69: * The jobs are mapped by setting the site handle for the jobs.
70: *
71: * @param workflow the workflow.
72: *
73: * @param sites the list of <code>String</code> objects representing the
74: * execution sites that can be used.
75: */
76: public void mapWorkflow(ADag workflow, List sites);
77:
78: /**
79: * This method returns a String describing the site selection technique
80: * that is being implemented by the implementing class.
81: *
82: * @return a short description
83: */
84: public String description();
85:
86: }
|