edu.isi.pegasus.planner.catalog
Interface SiteCatalog

All Superinterfaces:
Catalog
All Known Implementing Classes:
MYOSG, OSGMM, VORS, XML, XML3

public interface SiteCatalog
extends Catalog

Version:
$Revision: 2076 $
Author:
Karan Vahi

Field Summary
static String c_prefix
          Prefix for the property subset to use with this catalog.
static String VERSION
          The version of the API
 
Fields inherited from interface edu.isi.pegasus.planner.catalog.Catalog
DB_ALL_PREFIX
 
Method Summary
 int insert(SiteCatalogEntry entry)
          Inserts a new mapping into the Site catalog.
 Set<String> list()
          Lists the site handles for all the sites in the Site Catalog.
 int load(List<String> sites)
          Loads up the Site Catalog implementation with the sites whose site handles are specified.
 SiteCatalogEntry lookup(String handle)
          Retrieves the SiteCatalogEntry for a site.
 int remove(String handle)
          Removes a site catalog entry matching the the handle.
 
Methods inherited from interface edu.isi.pegasus.planner.catalog.Catalog
close, connect, isClosed
 

Field Detail

VERSION

static final String VERSION
The version of the API

See Also:
Constant Field Values

c_prefix

static final String c_prefix
Prefix for the property subset to use with this catalog.

See Also:
Constant Field Values
Method Detail

load

int load(List<String> sites)
         throws SiteCatalogException
Loads up the Site Catalog implementation with the sites whose site handles are specified. This is a convenience method, that can allow the backend implementations to maintain soft state if required. If the implementation chooses not to implement this, just do an empty implementation. The site handle * is a special handle designating all sites are to be loaded.

Parameters:
sites - the list of sites to be loaded.
Returns:
the number of sites loaded.
Throws:
SiteCatalogException - in case of error.

insert

int insert(SiteCatalogEntry entry)
           throws SiteCatalogException
Inserts a new mapping into the Site catalog.

Parameters:
entry - the SiteCatalogEntry object that describes a site.
Returns:
number of insertions, should always be 1. On failure, throw an exception, don't use zero.
Throws:
SiteCatalogException - in case of error.

list

Set<String> list()
                 throws SiteCatalogException
Lists the site handles for all the sites in the Site Catalog.

Returns:
A set of site handles.
Throws:
SiteCatalogException - in case of error.

lookup

SiteCatalogEntry lookup(String handle)
                        throws SiteCatalogException
Retrieves the SiteCatalogEntry for a site.

Parameters:
handle - the site handle / identifier.
Returns:
SiteCatalogEntry in case an entry is found , or null if no match is found.
Throws:
SiteCatalogException - in case of error.

remove

int remove(String handle)
           throws SiteCatalogException
Removes a site catalog entry matching the the handle.

Parameters:
handle - the site handle / identifier.
Returns:
the number of removed entries.
Throws:
SiteCatalogException - in case of error.


Copyright © 2011 The University of Southern California. All Rights Reserved.