LRC Operations

Data Structures

Defines

Functions


Detailed Description

Functions to view and update data managed by a LRC server.


Define Documentation

#define FRLI_BLOOMFILTER   0x1

Update RLI using bloom filters (see globus_rls_client_lrc_rli_add()).

#define MAXURL   256

Maximum length of URL string.


Function Documentation

globus_result_t globus_rls_client_lrc_attr_add ( globus_rls_handle_t h,
char *  key,
globus_rls_attribute_t attr 
)

Add an attribute to an object in the LRC database.

Parameters:
hHandle connected to an RLS server.
keyLogical or Physical File Name (LFN or PFN) that identifies object attribute should be added to.
attrAttribute to be added to object. name, objtype, type and val should be set in attr.
Return values:
GLOBUS_SUCCESSAttribute successfully associated with object.
globus_result_t globus_rls_client_lrc_attr_add_bulk ( globus_rls_handle_t h,
globus_list_t *  attr_obj_list,
globus_list_t **  str2bulk_list 
)

Bulk add attributes to objects in the LRC database.

Parameters:
hHandle connected to an RLS server.
attr_obj_listList of object names (LFN or PFN) and attributes to be added. Each list datum should be of type globus_rls_attribute_object_t.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the oject name, str2.s2 the attribute name, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_attr_create ( globus_rls_handle_t h,
char *  name,
globus_rls_obj_type_t  objtype,
globus_rls_attr_type_t  type 
)

Define new attribute in LRC database.

Parameters:
hHandle connected to an LRC server.
nameName of attribute.
objtypeObject (LFN or PFN) type that attribute applies to.
typeType of attribute value.
Return values:
GLOBUS_SUCCESSAttribute successfully created.
globus_result_t globus_rls_client_lrc_attr_delete ( globus_rls_handle_t h,
char *  name,
globus_rls_obj_type_t  objtype,
globus_bool_t  clearvalues 
)

Undefine attribute in LRC database, previously created with globus_rls_client_lrc_attr_create().

Parameters:
hHandle connected to an LRC server.
nameName of attribute.
objtypeObject (LFN or PFN) type that attribute applies to.
clearvaluesIf GLOBUS_TRUE then any any values for this attribute are first removed from the objects they're associated with. If GLOBUS_FALSE and any values exist then GLOBUS_RLS_ATTR_EXIST is returned.
Return values:
GLOBUS_SUCCESSAttribute successfully removed.
globus_result_t globus_rls_client_lrc_attr_get ( globus_rls_handle_t h,
char *  name,
globus_rls_obj_type_t  objtype,
globus_list_t **  attr_list 
)

Return definitions of attributes in LRC database.

Parameters:
hHandle connected to an RLS server.
nameName of attribute. If name is NULL all attributes of the specified objtype are returned.
objtypeObject (LFN or PFN) type that attribute applies to.
attr_listAny attribute definitions found will be returned as a list of globus_rls_attribute_t structures.
Return values:
GLOBUS_SUCCESSAttribute definitions successfully retrieved. attr_list should be freed with globus_rls_client_free_list() when it is no longer needed.
globus_result_t globus_rls_client_lrc_attr_modify ( globus_rls_handle_t h,
char *  key,
globus_rls_attribute_t attr 
)

Modify an attribute value.

Parameters:
hHandle connected to an RLS server.
keyName of object (LFN or PFN).
attrAttribute to be modified. The objtype , name and type fields should be set in attr to identify the attribute, the val field should be the new value.
Return values:
GLOBUS_SUCCESSAttribute successfully modified.
globus_result_t globus_rls_client_lrc_attr_remove ( globus_rls_handle_t h,
char *  key,
globus_rls_attribute_t attr 
)

Remove an attribute from an object (LFN or PFN) in the LRC database.

Parameters:
hHandle connected to an RLS server.
keyName of object (LFN or PFN).
attrAttribute to be removed. The objtype and name fields should be set in attr to identify the attribute.
Return values:
GLOBUS_SUCCESSAttribute successfully removed.
globus_result_t globus_rls_client_lrc_attr_remove_bulk ( globus_rls_handle_t h,
globus_list_t *  attr_obj_list,
globus_list_t **  str2bulk_list 
)

Bulk remove attributes from objects in the LRC database.

Parameters:
hHandle connected to an RLS server.
attr_obj_listList of object names (LFN or PFN) and attributes to be removed. It is not necessary to set the attribute type or value. Each list datum should be of type globus_rls_attribute_object_t.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the oject name, str2.s2 the attribute name, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_attr_search ( globus_rls_handle_t h,
char *  name,
globus_rls_obj_type_t  objtype,
globus_rls_attr_op_t  op,
globus_rls_attribute_t operand1,
globus_rls_attribute_t operand2,
int *  offset,
int  reslimit,
globus_list_t **  attr_obj_list 
)

Search for objects (LFNs or PFNs) in a LRC database that have the specified attribute whose value matches a boolean expression.

Parameters:
hHandle connected to an RLS server.
nameName of attribute.
objtypeObject (LFN or PFN) type that attribute applies to.
opOperator to be used in searching for values.
operand1First operand in boolean expression. type and val should be set in globus_rls_attribute_t.
operand2Second operand in boolean expression, only used when op is globus_rls_client_attr_op_btw. type and val should be set in globus_rls_attribute_t.
offsetOffset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. If NULL then API will handle accumulating partial results transparently.
reslimitMaximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.
attr_obj_listAny objects with the specified attribute will be returned, with the attribute value, in a list of globus_rls_attribute_object_t structures.
Return values:
GLOBUS_SUCCESSObjects with specified attribute returned in attr_obj_list. attr_obj_list should be freed with globus_rls_client_free_list() when it is no longer needed. See Query Results.
globus_result_t globus_rls_client_lrc_attr_value_get ( globus_rls_handle_t h,
char *  key,
char *  name,
globus_rls_obj_type_t  objtype,
globus_list_t **  attr_list 
)

Return attributes in LRC database for specified object (LFN or PFN).

Parameters:
hHandle connected to an RLS server.
keyLogical or Physical File Name (LFN or PFN) that identifies object attributes should be retrieved for.
nameName of attribute to retrieve. If NULL all attributes for key, objtype are returned.
objtypeObject (LFN or PFN) type that attribute applies to.
attr_listAny attributes found will be returned in this list of globus_rls_attribute_t structures.
Return values:
GLOBUS_SUCCESSAttributes successfully retrieved. attr_list should be freed with globus_rls_client_free_list() when it is no longer needed.
globus_result_t globus_rls_client_lrc_attr_value_get_bulk ( globus_rls_handle_t h,
globus_list_t *  keylist,
char *  name,
globus_rls_obj_type_t  objtype,
globus_list_t **  attr_obj_list 
)

Return attributes in LRC database for specified objects (LFN or PFN).

Parameters:
hHandle connected to an RLS server.
keylistLogical or Physical File Names (LFNs or PFNs) that identify object attributes should be retrieved for. Each list datum should be a string containing the LFN or PFN.
nameName of attribute to retrieve. If NULL all attributes for key, objtype are returned.
objtypeObject (LFN or PFN) type that attribute applies to.
attr_obj_listAny attributes found will be returned in this list of globus_rls_attribute_object_t structures.
Return values:
GLOBUS_SUCCESSAttributes successfully retrieved. attr_obj_list should be freed with globus_rls_client_free_list() when it is no longer needed.
globus_result_t globus_rls_client_lrc_add ( globus_rls_handle_t h,
char *  lfn,
char *  pfn 
)

Add mapping to PFN to an existing LFN.

Parameters:
hHandle connected to an RLS server.
lfnLFN to add pfn mapping to, should already exist.
pfnPFN that lfn should map to.
Return values:
GLOBUS_SUCCESSNew mapping created.
globus_result_t globus_rls_client_lrc_add_bulk ( globus_rls_handle_t h,
globus_list_t *  str2_list,
globus_list_t **  str2bulk_list 
)

Bulk add LFN,PFN mappings in LRC database.

LFNs must already exist.

Parameters:
hHandle connected to an RLS server.
str2_listLFN,PFN pairs to add mappings.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the LFN, and str2.s2 the PFN it maps to, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_clear ( globus_rls_handle_t h)

Clear all mappings from LRC database.

User needs both ADMIN and LRCUPDATE privileges to perform this operation. Note that if the LRC is cleared this will not be reflected in any RLI servers updated by the LRC until the next softstate update, even if immediate updates are enabled.

Parameters:
hHandle connected to an RLS server.
Return values:
GLOBUS_SUCCESSMappings cleared.
globus_result_t globus_rls_client_lrc_create ( globus_rls_handle_t h,
char *  lfn,
char *  pfn 
)

Create mapping between a LFN and PFN.

LFN should not exist yet.

Parameters:
hHandle connected to an RLS server.
lfnLFN to add pfn mapping to, should not already exist.
pfnPFN that lfn should map to.
Return values:
GLOBUS_SUCCESSNew mapping created.
globus_result_t globus_rls_client_lrc_create_bulk ( globus_rls_handle_t h,
globus_list_t *  str2_list,
globus_list_t **  str2bulk_list 
)

Bulk create LFN,PFN mappings in LRC database.

Parameters:
hHandle connected to an RLS server.
str2_listLFN,PFN pairs to create mappings for.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the LFN, and str2.s2 the PFN it maps to, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_delete ( globus_rls_handle_t h,
char *  lfn,
char *  pfn 
)

Delete mapping between LFN and PFN.

Parameters:
hHandle connected to an RLS server.
lfnLFN to remove mapping from.
pfnPFN that lfn maps to that is being removed.
Return values:
GLOBUS_SUCCESSMapping removed.
globus_result_t globus_rls_client_lrc_delete_bulk ( globus_rls_handle_t h,
globus_list_t *  str2_list,
globus_list_t **  str2bulk_list 
)

Bulk delete LFN,PFN mappings in LRC database.

Parameters:
hHandle connected to an RLS server.
str2_listLFN,PFN pairs to add mappings.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the LFN, and str2.s2 the PFN it maps to, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_exists ( globus_rls_handle_t h,
char *  key,
globus_rls_obj_type_t  objtype 
)

Check if an object exists in the LRC database.

Parameters:
hHandle connected to an RLS server.
keyLFN or PFN that identifies object.
objtypeType of object key refers to (globus_rls_obj_lrc_lfn or globus_rls_obj_lrc_pfn).
Return values:
GLOBUS_SUCCESSObject exists.
globus_result_t globus_rls_client_lrc_exists_bulk ( globus_rls_handle_t h,
globus_list_t *  keylist,
globus_rls_obj_type_t  objtype,
globus_list_t **  str2bulk_list 
)

Bulk check if objects exist in the LRC database.

Parameters:
hHandle connected to an RLS server.
keylistLFNs or PFNs that identify objects.
objtypeType of object key refers to (globus_rls_obj_lrc_lfn or globus_rls_obj_lrc_pfn).
str2bulk_listResults of existence check. Each list datum will be a globus_rls_string2_bulk_t structure. str2.s1 will be the LFN or PFN, and str2.s2 empty, and rc will be the result code indicating existence.
globus_result_t globus_rls_client_lrc_get_lfn ( globus_rls_handle_t h,
char *  pfn,
int *  offset,
int  reslimit,
globus_list_t **  str2_list 
)

Return LFNs mapped to PFN in the LRC database.

Parameters:
hHandle connected to an RLS server.
pfnPFN to search for.
offsetOffset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. If NULL then API will handle accumulating partial results transparently.
reslimitMaximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.
str2_listList of LFNs that map to pfn. Each list datum will be a globus_rls_string2_t structure. s1 will be the LFN, and s2 the PFN it maps to.
Return values:
GLOBUS_SUCCESSList of LFNs that map to pfn in str2_list. See Query Results.
globus_result_t globus_rls_client_lrc_get_lfn_bulk ( globus_rls_handle_t h,
globus_list_t *  pfnlist,
globus_list_t **  str2bulk_list 
)

Bulk return LFNs mapped to PFN in the LRC database.

Parameters:
hHandle connected to an RLS server.
pfnlistPFNs to search for.
str2bulk_listResults of queries. Each list datum will be a globus_rls_string2_bulk_t structure. str2.s1 will be the LFN, and str2.s2 the PFN it maps to, and rc will be the result code from the query.
globus_result_t globus_rls_client_lrc_get_lfn_wc ( globus_rls_handle_t h,
char *  pfn_pattern,
globus_rls_pattern_t  type,
int *  offset,
int  reslimit,
globus_list_t **  str2_list 
)

Return LFNs mapped to wildcarded PFN in the LRC database.

Parameters:
hHandle connected to an RLS server.
pfn_patternPFN pattern to search for.
typeIdentifies wildcard characters used in pfn_pattern. Wildcard chars can be Unix file globbing chars (* matches 0 or more characters, ? matches any single character) or SQL "like" wildcard characters (% matches 0 or more charactes, _ matches any single character).
offsetOffset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. If NULL then the API will handle accumulating partial results transparently.
reslimitMaximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.
str2_listList of LFNs that map to pfn_pattern. Each list datum will be a globus_rls_string2_t structure. s1 will be the LFN, and s2 the PFN it maps to.
Return values:
GLOBUS_SUCCESSList of LFNs that map to pfn_pattern in str2_list. See Query Results.
globus_result_t globus_rls_client_lrc_get_pfn ( globus_rls_handle_t h,
char *  lfn,
int *  offset,
int  reslimit,
globus_list_t **  str2_list 
)

Return PFNs mapped to LFN in the LRC database.

Parameters:
hHandle connected to an RLS server.
lfnLFN to search for.
offsetOffset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result.
reslimitMaximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.
str2_listList of PFNs that map to lfn. Each list datum will be a globus_rls_string2_t structure. s1 will be the LFN, and s2 the PFN it maps to.
Return values:
GLOBUS_SUCCESSList of PFNs that map to lfn in str2_list.
globus_result_t globus_rls_client_lrc_get_pfn_bulk ( globus_rls_handle_t h,
globus_list_t *  lfnlist,
globus_list_t **  str2bulk_list 
)

Bulk return PFNs mapped to LFN in the LRC database.

Parameters:
hHandle connected to an RLS server.
lfnlistLFNs to search for.
str2bulk_listResults of queries. Each list datum will be a globus_rls_string2_bulk_t structure. str2.s1 will be the LFN, and str2.s2 the PFN it maps to, and rc will be the result code from the query.
globus_result_t globus_rls_client_lrc_get_pfn_wc ( globus_rls_handle_t h,
char *  lfn_pattern,
globus_rls_pattern_t  type,
int *  offset,
int  reslimit,
globus_list_t **  str2_list 
)

Return PFNs mapped to wildcarded LFN in the LRC database.

Parameters:
hHandle connected to an RLS server.
lfn_patternLFN pattern to search for.
typeIdentifies wildcard characters used in lfn_pattern. Wildcard chars can be Unix file globbing chars (* matches 0 or more characters, ? matches any single character) or SQL "like" wildcard characters (% matches 0 or more charactes, _ matches any single character).
offsetOffset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result.
reslimitMaximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.
str2_listList of PFNs that map to lfn_pattern. Each list datum will be a globus_rls_string2_t structure. s1 will be the LFN, and s2 the PFN it maps to.
Return values:
GLOBUS_SUCCESSList of PFNs that map to lfn_pattern in str2_list. See Query Results.
globus_result_t globus_rls_client_lrc_mapping_exists ( globus_rls_handle_t h,
char *  lfn,
char *  pfn 
)

Check if a mapping exists in the LRC database.

Parameters:
hHandle connected to an RLS server.
lfnLFN of mapping.
pfnPFN of mapping.
Return values:
GLOBUS_SUCCESSObject exists.
globus_result_t globus_rls_client_lrc_renamelfn ( globus_rls_handle_t h,
char *  oldname,
char *  newname 
)

Rename LFN.

If immediate mode is ON, the LRC will send update messages to associated RLIs.

Parameters:
hHandle connected to an RLS server.
oldnameExisting LFN name, to be renamed.
newnameNew LFN name, to replace existing name.
Return values:
GLOBUS_SUCCESSLFN renamed.
globus_result_t globus_rls_client_lrc_renamelfn_bulk ( globus_rls_handle_t h,
globus_list_t *  str2_list,
globus_list_t **  str2bulk_list 
)

Bulk rename LFN names in LRC database.

LFNs must already exist. If immediate mode is ON, the LRC will send update messages to associated RLIs.

Parameters:
hHandle connected to an RLS server.
str2_listoldname,newname pairs such that newname replaces oldname for LFNs.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the old LFN name, and str2.s2 the new LFN name, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_renamepfn ( globus_rls_handle_t h,
char *  oldname,
char *  newname 
)

Rename PFN.

Parameters:
hHandle connected to an RLS server.
oldnameExisintg PFN name, to be renamed.
newnameNew PFN name, to replace existing name.
Return values:
GLOBUS_SUCCESSPFN renamed.
globus_result_t globus_rls_client_lrc_renamepfn_bulk ( globus_rls_handle_t h,
globus_list_t *  str2_list,
globus_list_t **  str2bulk_list 
)

Bulk rename PFN names in LRC database.

PFNs must already exist.

Parameters:
hHandle connected to an RLS server.
str2_listoldname,newname pairs such that newname replaces oldname for PFNs.
str2bulk_listList of failed updates. Each list datum is a globus_rls_string2_bulk_t structure. str2.s1 will be the old PFN name, and str2.s2 the new PFN name, and rc will be the result code from the failed update. Only failed updates will be returned.
globus_result_t globus_rls_client_lrc_rli_add ( globus_rls_handle_t h,
char *  rli_url,
int  flags,
char *  pattern 
)

LRC servers send information about LFNs in their database to the the list of RLI servers in the database, added with the following function.

Updates may be partitioned amongst multiple RLIs by specifying one or more patterns for an RLI.

Parameters:
hHandle connected to an RLS server.
rli_urlURL of RLI server that LRC should send updates to.
flagsShould be zero or FRLI_BLOOMFILTER.
patternIf not NULL used to filter which LFNs are sent to rli_url. Standard Unix wildcard characters (*, ?) may be used to do wildcard matches.
Return values:
GLOBUS_SUCCESSRLI (with pattern if not NULL) added to LRC database.
globus_result_t globus_rls_client_lrc_rli_delete ( globus_rls_handle_t h,
char *  rli_url,
char *  pattern 
)

Delete an entry from the LRC rli/partition tables.

Parameters:
hHandle connected to an RLS server.
rli_urlURL of RLI server to remove from LRC partition table.
patternIf not NULL then only the specific rli_url/pattern is removed, else all partition information for rli_url is removed.
Return values:
GLOBUS_SUCCESSRLI and pattern (if specified) removed from LRC partition table.
globus_result_t globus_rls_client_lrc_rli_get_part ( globus_rls_handle_t h,
char *  rli_url,
char *  pattern,
globus_list_t **  str2_list 
)

Get RLI update partitions from LRC server.

Parameters:
hHandle connected to an RLS server.
rli_urlIf not NULL identifies RLI that partition data will be retrieved for. If NULL then all RLIs are retrieved.
patternIf not NULL returns only partitions with matching patterns, otherwise all patterns are retrieved.
str2_listResults added to list. Datums in str2_list are of type globus_rls_string2_t structure. s1 will be the rli url, s2 an empty string or the pattern used to partition updates. See Query Results.
Return values:
GLOBUS_SUCCESSPartition data retrieved from server, written to str2_list.
globus_result_t globus_rls_client_lrc_rli_info ( globus_rls_handle_t h,
char *  rli_url,
globus_rls_rli_info_t info 
)

Get info about RLI server updated by an LRC server.

Parameters:
hHandle connected to an RLS server.
rli_urlURL of RLI server to retrieve info for.
infoData about RLI server will be written here.
Return values:
GLOBUS_SUCCESSInfo about RLI server successfully retrieved.
globus_result_t globus_rls_client_lrc_rli_list ( globus_rls_handle_t h,
globus_list_t **  rliinfo_list 
)

Return URLs of RLIs that LRC sends updates to.

Parameters:
hHandle connected to an RLS server.
rliinfo_listList of RLIs updated by this LRC returned in this list. Each list datum is of type globus_rls_rli_info_t. rliinfo_list should be freed with globus_rls_client_free_list() when no longer needed.
Return values:
GLOBUS_SUCCESSList of RLIs updated by this LRC returned in rliinfo_list.