NAME

Globus::RLS - Perl extension for Globus RLS client


SYNOPSIS

  use Globus::RLS;


DESCRIPTION

Globus RLS client API for accessing Globus RLS server.

For more information on the interface see http://www.isi.edu/%7Eannc/rls/doc/client/index.html.


METHODS

Methods call die in case of fatal error and call warn in case of recoverable errors. If there was a fault, return value is not equal to 0 (zero). Methods call die when format of input parameters are not correct. The fault string and details are added to the die or warn message.

Constructor/Activation

new()
Constructor method for an RLS client.

Return value: $rv is a reference to an RLS object, if successful. Otherwise, the method dies.

Example:

    my $rls = Globus:RLS->new();

Connection Management

globus_rls_client_connect($endpoint)
Open a connection to the Globus RLS server pointed by $endpoint.

Return value: No value returned. In case of failure, the method dies.

Example:

    $rls->globus_rls_client_connect("rls://rls_server.example.org");

globus_rls_client_close()
Close the connection to the Globus RLS server.

Return value: No value returned. In case of failure, the method dies.

Example:

    $rls->globus_rls_client_close();

globus_rls_client_get_timeout()
Get timeout for IO calls to RLS server. If 0 IO calls do not timeout. The default is 30 seconds.

Return value: $timeout is the timeout in seconds.

Example:

    $timeout = $rls->globus_rls_client_get_timeout();

globus_rls_client_set_timeout($timeout)
Set timeout for IO calls to RLS server to be $timeout seconds.

Return value: No value returned.

Example:

    $rls->globus_rls_client_set_timeout(60);

LRC Operations

globus_rls_client_lrc_attr_add($object, $attrname, $objtype, $attrtype, $val)
Add an attribute to an object in the LRC database.

The $object is the name of an LFN (Logic File Name) or PFN (Physical File Name) previously created with globus_rls_client_lrc_create(). The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants. The $attrtype parameter is one of the ``globus_rls_attr_type_date'', ``globus_rls_attr_type_flt'', ``globus_rls_attr_type_int'', ``globus_rls_attr_type_str'' constants. The $val input parameter is the value of the attribute to be assigned to the object.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_attr_add("MyLFN", "size", "globus_rls_obj_lrc_lfn", "globus_rls_attr_type_int", 1000);

globus_rls_client_lrc_attr_add_bulk($handle, $listofelements)
Bulk add attributes to objects in the LRC database.

Note:

    Developed, but test failed, due to some globus client problem!!
    Needs further investigation.

globus_rls_client_lrc_attr_create($attrname, $objtype, $attrtype)
Define new attribute in LRC database.

The $attrname is the name of attribute to be created. The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants. The $attrtype parameter is one of the ``globus_rls_attr_type_date'', ``globus_rls_attr_type_flt'', ``globus_rls_attr_type_int'', ``globus_rls_attr_type_str'' constants. The $val input parameter is the value of the attribute to be assigned to the object.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_attr_create("size", "globus_rls_obj_lrc_lfn", "globus_rls_attr_type_int");

globus_rls_client_lrc_attr_delete($attrname,$objtype,$clearvalues)
Undefine attribute in LRC database.

The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants. If $clearvalues is evaluated as true then any values for this attribute are first removed from the objects they're associated with. If $clearvalues is false and any values exist then method fails.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rls->globus_rls_client_lrc_attr_delete("size","globus_rls_obj_lrc_lfn",1);

globus_rls_client_lrc_attr_get($attrname,$objtype)
Return definitions of attributes in LRC database.

The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list is a list of references to hashes storing attributes with the following keys: ``NAME'', ``OBJTYPE'', ``TYPE''.

Example:

    ($rv, @list) = $rls->globus_rls_client_lrc_attr_get("size","globus_rls_obj_lrc_lfn");
    while ( $attrib = shift(@list) and defined($attrib)) {
      foreach $key ("NAME","OBJTYPE","TYPE") {
        print $key," : ",$attrib->{$key},"\n"; } }

globus_rls_client_lrc_attr_modify($object,$attrname,$objtype,$attrtype,$val)
Modify an attribute value.

The $object is the name of an LFN (Logic File Name) or PFN (Physical File Name) previously created with globus_rls_client_lrc_create(). The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants. The $attrtype parameter is one of the ``globus_rls_attr_type_date'', ``globus_rls_attr_type_flt'', ``globus_rls_attr_type_int'', ``globus_rls_attr_type_str'' constants. The $val input parameter is the new value of the attribute to be assigned to the object.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_attr_modify("MyLFN", "size", "globus_rls_obj_lrc_lfn", "globus_rls_attr_type_int", 2000);

globus_rls_client_lrc_attr_remove($object,$attrname,$objtype)
Remove an attribute from an object (LFN or PFN) in the LRC database.

The $object is the name of an LFN (Logic File Name) or PFN (Physical File Name) previously created with globus_rls_client_lrc_create(). The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_attr_remove("MyLFN", "size", "globus_rls_obj_lrc_lfn");

globus_rls_client_lrc_attr_search($attrname,$objtype,$op,$attrtype,$val,$offset,$reslimit)
Search for objects (LFNs or PFNs) in a LRC database that have the specified attribute whose value matches a boolean expression.

The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants. The $op is the operand represented as string that can be on of the followings: ``='', ``!='', ``>'', ``>='', ``<'', ``<='', ``like''. The $attrtype parameter is one of the ``globus_rls_attr_type_date'', ``globus_rls_attr_type_flt'', ``globus_rls_attr_type_int'', ``globus_rls_attr_type_str'' constants. The $val input parameter is the value of the attribute. Value is evaluated on the right side in the boolean expression during search.

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes containing object parameters with the specified attribute. Keys to hashes are ``KEY'', ``ATTR.NAME'', ``ATTR.TYPE'', ``ATTR.VAL'', ``ATTR.OBJTYPE'', ``ERRMSG'', ``RC''. RC is the return status of the actual object. If it is not equal to zero ``ERRMSG'' is specified.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_lrc_attr_search ("size", "globus_rls_obj_lrc_lfn", ">", "globus_rls_attr_type_int", 1000, 0, 0);
    while ( $attrib = shift(@list) and defined($attrib)) {
      foreach $key ("KEY", "ATTR.NAME", "ATTR.TYPE", "ATTR.VAL", "ATTR.OBJTYPE", "ERRMSG", "RC") {
        print $key," : ",$attrib->{$key},"\n"; } }

globus_rls_client_lrc_attr_value_get($object, $attrname, $objtype)
Return attributes in LRC database for specified object (LFN or PFN).

The $object is the name of an LFN (Logic File Name) or PFN (Physical File Name) previously created with globus_rls_client_lrc_create(). The $attrname is the name of attribute previously created with globus_rls_client_lrc_attr_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing object parameters with the specified value. Keys to hashes are ``NAME'', ``TYPE'', ``VAL'', ``OBJTYPE''.

Example:

    ($rv, @list) = $rls->globus_rls_client_lrc_attr_value_get("MyLFN", "size", "globus_rls_obj_lrc_lfn");
    while ( $attrib = shift(@list) and defined($attrib)) {
      foreach $key ("NAME", "TYPE", "VAL", "OBJTYPE") {
        print $key," : ",$attrib->{$key},"\n"; } }

globus_rls_client_lrc_add($lfn, $pfn)
Add mapping of PFN to an existing LFN.

The $lfn is the name of an LFN (Logic File Name) previously created with globus_rls_client_lrc_create(). The $pfn is the name of a PFN (Physical File Name).

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_add("MyLFN", "aPFN");

globus_rls_client_lrc_add_bulk(\@lfnpfnlist)
Bulk add LFN,PFN mappings in LRC database. LFNs must already exist.

The \@lfnpfnlist is reference to array containing the name of an LFN (Logical File Name) and the name of a PFN (Physical File Name) one ofter the other.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing failed updates. Keys to hashes are ``STR2.S1'' containing LFN, ``STR2.S2'' containing PFN, ``ERRMSG'' containing error message and ``RC'' containing result code.

Example:

    $lfnpfnlist = ["MyLFN", "PFNa", "MyLFN", "PFNb"];
    ($rv,@list) = $rls->globus_rls_client_lrc_add_bulk($lfnpfnlist);
    while ( $anerror = shift(@list) and defined($anerror)) {
      foreach $key ("STR2.S1", "STR2.S2", "ERRMSG", "RC") {
        print $key," : ",$anerror->{$key},"\n"; } }

globus_rls_client_lrc_clear()
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.

No input parameter is required.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_clear();

globus_rls_client_lrc_create($lfn, $pfn)
Create mapping between a LFN and PFN. LFN should not exist yet.

The $lfn is the name of an LFN (Logic File Name). The $pfn is the name of a PFN (Physical File Name).

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_create("MyLFN", "anewPFN");

globus_rls_client_lrc_create_bulk(\@lfnpfnlist)
Bulk create LFN,PFN mappings in LRC database.

The \@lfnpfnlist is reference to array containing the name of an LFN (Logical File Name) and the name of a PFN (Physical File Name) one ofter the other.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing failed updates. Keys to hashes are ``STR2.S1'' containing LFN, ``STR2.S2'' containing PFN, ``ERRMSG'' containing error message and ``RC'' containing result code.

Example:

    $lfnpfnlist = ["MyLFN", "PFNa", "MyOtherLFN", "PFNa"];
    ($rv,@list) = $rls->globus_rls_client_lrc_create_bulk($lfnpfnlist);
    while ( $anerror = shift(@list) and defined($anerror)) {
      foreach $key ("STR2.S1", "STR2.S2", "ERRMSG", "RC") {
        print $key," : ",$anerror->{$key},"\n"; } }

globus_rls_client_lrc_delete($lfn, $pfn)
Delete mapping between LFN and PFN.

The $lfn is the name of an LFN (Logic File Name) previously created with globus_rls_client_lrc_create(). The $pfn is the name of a PFN (Physical File Name).

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_delete("MyLFN", "aPFN");

globus_rls_client_lrc_delete_bulk(\@lfnpfnlist)
Bulk delete LFN,PFN mappings in LRC database.

The \@lfnpfnlist is reference to array containing the name of an LFN (Logical File Name) and the name of a PFN (Physical File Name) one ofter the other.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing failed updates. Keys to hashes are ``STR2.S1'' containing LFN, ``STR2.S2'' containing PFN, ``ERRMSG'' containing error message and ``RC'' containing result code.

Example:

    $lfnpfnlist = ["MyLFN", "PFNa", "MyLFN", "PFNb", "MyOtherLFN", "PFNa"];
    ($rv,@list) = $rls->globus_rls_client_lrc_delete_bulk($lfnpfnlist);
    while ( $anerror = shift(@list) and defined($anerror)) {
      foreach $key ("STR2.S1", "STR2.S2", "ERRMSG", "RC") {
        print $key," : ",$anerror->{$key},"\n"; } }

globus_rls_client_lrc_exists($object, $objtype)
Check if an object exists in the LRC database.

The $object is the name of an LFN (Logic File Name) or PFN (Physical File Name) previously created with globus_rls_client_lrc_create(). The $objtype can be one of ``globus_rls_obj_lrc_lfn'' or ``globus_rls_obj_lrc_pfn'' constants.

Return value: $rv is 0, if exists. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_exists("MyLFN","globus_rls_obj_lrc_lfn");

globus_rls_client_lrc_get_lfn($pfn, $offset, $reslimit)
Return LFNs mapped to PFN in the LRC database.

The $pfn is the name of a PFN (Physical File Name).

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes with existing LFN - PFN mapping. Keys to hashes are ``S1'' containing LFN and ``S2'' containing PFN.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_lrc_get_lfn("aPFN", 0, 0);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("S1", "S2") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_lrc_get_lfn_bulk(\@pfnlist)
Bulk return LFNs mapped to PFN in the LRC database.

The \@pfnlist is a reference to array containing the name of PFNs (Physical File Name) one ofter the other.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes with LFN - PFN mapping, if exists. It contains error value and error message, if PFN does not exists. Keys to hashes are ``STR2.S1'' containing LFN, ``STR2.S2'' containing PFN, ``RC'' containing result code (0 means PFN found) and ``ERRMSG'' containing error message (if RC is not equal to 0).

Example:

    $pfnlist = ["aPFN", "otherPFN", "anotherPFN"];
    ($rv, @list) = $rls->globus_rls_client_lrc_get_lfn_bulk($pfnlist);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("STR2.S1", "STR2.S2", "RC", "ERRMSG") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_lrc_get_lfn_wc($pattern, $pattern_type, $offset, $reslimit)
Return LFNs mapped to wildcarded PFN in the LRC database.

The $pattern is the string containing a pattern to search for. The $pattern_type can be one of the ``rls_pattern_unix'' or ``rls_pattern_sql'' string contants. The pattern type identifies wildcard characters used in $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).

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes with existing LFN - PFN mapping. Keys to hashes are ``S1'' containing LFN and ``S2'' containing PFN.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_lrc_get_lfn_wc("*PFN","rls_pattern_unix", 0, 0);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("S1", "S2") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_lrc_get_pfn($lfn, $offset, $reslimit)
Return PFNs mapped to LFN in the LRC database.

The $lfn is the name of an LFN (Logical File Name).

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes with existing LFN - PFN mapping. Keys to hashes are ``S1'' containing LFN and ``S2'' containing PFN.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_lrc_get_pfn("MyLFN", 0, 0);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("S1", "S2") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_lrc_get_pfn_bulk(\@lfnlist)
Bulk return PFNs mapped to LFN in the LRC database.

The \@lfnlist is reference to array containing the names of LFNs (Logical File Name).

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes with LFN - PFN mapping, if exists. It contains error value and error message, if LFN does not exists. Keys to hashes are ``STR2.S1'' containing LFN, ``STR2.S2'' containing PFN, ``RC'' containing result code (0 means LFN found) and ``ERRMSG'' containing error message (if RC is not equal to 0).

Example:

    $lfnlist = ["anLFN", "otherLFN", "anotherLFN"];
    ($rv, @list) = $rls->globus_rls_client_lrc_get_pfn_bulk($lfnlist);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("STR2.S1", "STR2.S2", "RC", "ERRMSG") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_lrc_get_pfn_wc($pattern, $pattern_type, $offset, $reslimit)
Return PFNs mapped to wildcarded LFN in the LRC database.

The $pattern is the string containing a pattern to search for. The $pattern_type can be one of the ``rls_pattern_unix'' or ``rls_pattern_sql'' string contants. The pattern type identifies wildcard characters used in $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).

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes with existing LFN - PFN mapping. Keys to hashes are ``S1'' containing LFN and ``S2'' containing PFN.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_lrc_get_pfn_wc("\%LFN", "rls_pattern_sql", 0, 0);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("S1", "S2") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_lrc_mapping_exists($lfn, $pfn)
Check if a mapping exists in the LRC database.

The $lfn is the name of an LFN (Logic File Name) previously created with globus_rls_client_lrc_create(). The $pfn is the name of a PFN (Physical File Name).

Return value: $rv is 0, if exists. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_mapping_exists("MyLFN","aPFN");

globus_rls_client_lrc_rli_add($rli_url, $flags, $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.

The $rli_url is an URL of RLI server that LRC should send updates to. The $flags should be zero. The $pattern is used to filter which LFNs are sent to rli_url. Standard Unix wildcard characters (*, ?) may be used to do wildcard matches.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_rli_add("rls://rls_server.example.org", 0, "*");

globus_rls_client_lrc_rli_delete($rli_url, $pattern)
Delete an entry from the LRC rli/partition tables.

The $rli_url is an URL of RLI server to remove from LRC partition table. The $pattern is used to specify which rli_url/pattern is removed. Standard Unix wildcard characters (*, ?) may be used to do wildcard matches.

Return value: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_lrc_rli_delete("rls://rls_server.example.org", "*");

globus_rls_client_lrc_rli_get_part($rli_url, $pattern)
Get RLI update partitions from LRC server.

The $rli_url identifies RLI that partition data will be retrieved for. The $pattern is used to filter partitions. Standard Unix wildcard characters (*, ?) may be used to do wildcard matches.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing partitions. Keys to hashes are ``S1'' containing RLI_URL and ``S2'' containing pattern used to partition updates.

Example:

    ($rv, @list) = $rls->globus_rls_client_lrc_rli_get_part("rls://rls_server.example.org", "*");
    while ( $rli = shift(@list) and defined($rli)) {
      foreach $key ("S1","S2") {
        print $key," : ",$rli->{$key},"\n"; } }

globus_rls_client_lrc_rli_info($rli_url)
Get info about RLI server updated by an LRC server.

The $rli_url is an URL of RLI server to retrieve info for.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $info with the reference to a hash containing information on the specified rli. Keys to the hash are ``URL'' containing rli url, ``FLAGS'' containing pattern used to partition updates, ``LASTUPDATE'' containing the time of last softstate update and ``UPDATEINTERVAL'' containing the interval between softstate updates.

Example:

    ($rv, $info) = $rls->globus_rls_client_lrc_rli_info("rls://rls_server.example.org");
    foreach $key ("URL","FLAGS", "LASTUPDATE", "UPDATEINTERVAL") {
      print $key," : ",$info->{$key},"\n"; }

globus_rls_client_lrc_rli_list()
Return URLs of RLIs that LRC sends updates to.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing information on rlis. Keys to hashes are ``URL'' containing rli url, ``FLAGS'' containing pattern used to partition updates, ``LASTUPDATE'' containing the time of last softstate update and ``UPDATEINTERVAL'' containing the interval between softstate updates.

Example:

    ($rv, @list) = $rls->globus_rls_client_lrc_rli_list();
    while ( $rli = shift(@list) and defined($rli)) {
      foreach $key ("URL","FLAGS", "LASTUPDATE", "UPDATEINTERVAL") {
        print $key," : ",$rli->{$key},"\n"; } }

RLI Operations

globus_rls_client_rli_exists($object, $objtype)
Check if an object exists in the RLI database.

The $object is the name of an LFN (Logic File Name) previously created with globus_rls_client_lrc_create() or the name of an LRC. The $objtype can be one of ``globus_rls_obj_rli_lrc'' or ``globus_rls_obj_rli_lfn'' constants, signing the type of $object.

Return value: $rv is 0, if exists. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_rli_exists("MyLFN","globus_rls_obj_rli_lfn");
    OR
    $rv = $rls->globus_rls_client_rli_exists("rls://rls_server.example.org:39281","globus_rls_obj_rli_lrc");

globus_rls_client_rli_get_lrc($lfn, $offset, $reslimit)
Return LRCs mapped to LFN in the RLI database.

The $lfn is the name of an LFN (Logical File Name) whose list of LRCs is desired.

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes with existing LFN - LRC mapping. Keys to hashes are ``S1'' containing LFN and ``S2'' containing an LRC that $lfn maps to.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_rli_get_lrc("MyLFN", 0, 0);
    while ( $lrc = shift(@list) and defined($lrc)) {
      foreach $key ("S1", "S2") {
        print $key," : ",$lrc->{$key},"\n"; } }

globus_rls_client_rli_get_lrc_bulk(\@lfnlist)
Bulk return LRCs mapped to LFN in the RLI database.

The \@lfnlist is reference to array containing the names of LFNs (Logical File Name).

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes with existing LFN - LRC mapping. Keys to hashes are ``STR2.S1'' containing LFN, ``STR2.S2'' containing an LRC that $lfn maps to, ``RC'' containing result code (0 means mapping found) and ``ERRMSG'' containing error message (when rc is not zero).

Example:

    $lfnlist = ["anLFN", "otherLFN", "anotherLFN"];
    ($rv, @list) = $rls->globus_rls_client_rli_get_lrc_bulk($lfnlist);
    while ( $pair = shift(@list) and defined($pair)) {
      foreach $key ("STR2.S1", "STR2.S2", "RC", "ERRMSG") {
        print $key," : ",$pair->{$key},"\n"; } }

globus_rls_client_rli_get_lrc_wc($pattern, $pattern_type, $offset, $reslimit)
Return LRCs mapped to wildcarded LFN in the RLI database.

The $pattern is the string containing an LFN pattern to search for. The $pattern_type can be one of the ``rls_pattern_unix'' or ``rls_pattern_sql'' string contants. The pattern type identifies wildcard characters used in $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).

$offset is offset into result list. Used in conjunction with reslimit to retrieve results a few at a time. Use 0 to begin with first result. $reslimit is the maximum number of results to return. Used in conjunction with offset to retrieve results a few at a time. Use 0 to retrieve all results.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. $offset as explained above. @list with the list of references to hashes with LRCs that map to $pattern. Keys to hashes are ``S1'' containing LFN and ``S2'' containing the LRC it maps to.

Example:

    ($rv, $offset, @list) = $rls->globus_rls_client_rli_get_lrc_wc("*LFN","rls_pattern_unix", 0, 0);
    while ( $lrc = shift(@list) and defined($lrc)) {
      foreach $key ("S1", "S2") {
        print $key," : ",$lrc->{$key},"\n"; } }

globus_rls_client_rli_lrc_list()
Get list of LRCs updating this RLI server. Similar to globus_rls_client_rli_get_part() except no partition information is returned, just the LRC URLs.

Return values: $rv is 0, if successful. Otherwise, a value greater than 0 in $rv is returned. @list with the list of references to hashes containing information on rlis. Keys to hashes are ``URL'' containing rli url and ``LASTUPDATE'' containing the time of last softstate update.

Example:

    ($rv, @list) = $rls->globus_rls_client_rli_lrc_list();
    while ( $lrc = shift(@list) and defined($lrc)) {
      foreach $key ("URL", "LASTUPDATE") {
        print $key," : ",$lrc->{$key},"\n"; } }

globus_rls_client_rli_mapping_exists($lfn, $lrc)
Check if a mapping exists in the RLI database.

The $lfn is the name of an LFN (Logic File Name) previously created with globus_rls_client_lrc_create(). The $lrc is the url of an LRC.

Return value: $rv is 0, if exists. Otherwise, a value greater than 0 in $rv is returned.

Example:

    $rv = $rls->globus_rls_client_rli_mapping_exists("MyLFN","rls://rls_server.example.org:39281");


AUTHOR

Jozsef Kovacs, <Jozsef.Kovacs@cern.ch>


COPYRIGHT AND LICENSE

Copyright (c) Members of the EGEE Collaboration. 2004. See http://public.eu-egee.org/partners/ for details on the copyright holders. For license conditions see the license file or http://www.eu-egee.org/license.html