Package edu.isi.pegasus.planner.catalog
Interface SiteCatalog
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Stringc_prefixPrefix for the property subset to use with this catalog.static java.lang.StringVERSIONThe version of the API-
Fields inherited from interface edu.isi.pegasus.planner.catalog.Catalog
DB_ALL_PREFIX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intinsert(SiteCatalogEntry entry)Inserts a new mapping into the Site catalog.java.util.Set<java.lang.String>list()Lists the site handles for all the sites in the Site Catalog.intload(java.util.List<java.lang.String> sites)Loads up the Site Catalog implementation with the sites whose site handles are specified.SiteCatalogEntrylookup(java.lang.String handle)Retrieves theSiteCatalogEntryfor a site.intremove(java.lang.String handle)Removes a site catalog entry matching the the handle.
-
-
-
Field Detail
-
VERSION
static final java.lang.String VERSION
The version of the API- See Also:
- Constant Field Values
-
c_prefix
static final java.lang.String c_prefix
Prefix for the property subset to use with this catalog.- See Also:
- Constant Field Values
-
-
Method Detail
-
load
int load(java.util.List<java.lang.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- theSiteCatalogEntryobject 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
java.util.Set<java.lang.String> list() throws SiteCatalogExceptionLists 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(java.lang.String handle) throws SiteCatalogException
Retrieves theSiteCatalogEntryfor a site.- Parameters:
handle- the site handle / identifier.- Returns:
- SiteCatalogEntry in case an entry is found , or
nullif no match is found. - Throws:
SiteCatalogException- in case of error.
-
remove
int remove(java.lang.String handle) throws SiteCatalogExceptionRemoves 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.
-
-