Package edu.isi.pegasus.planner.catalog
Interface SiteCatalog
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
c_prefix
Prefix for the property subset to use with this catalog.static java.lang.String
VERSION
The 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 int
insert(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.int
load(java.util.List<java.lang.String> sites)
Loads up the Site Catalog implementation with the sites whose site handles are specified.SiteCatalogEntry
lookup(java.lang.String handle)
Retrieves theSiteCatalogEntry
for a site.int
remove(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
- theSiteCatalogEntry
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
java.util.Set<java.lang.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(java.lang.String handle) throws SiteCatalogException
Retrieves theSiteCatalogEntry
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(java.lang.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.
-
-