NAME
Uttu::Resource::pool - <pool/> handler for resource definitions
SYNOPSIS
In resource definition file:
<resources id="gst">
<pool id="ldap"
policy="RoundRobin"
maxtry="4"
sleeponfail="1, 2, 3, 4"
weight="1"
suspendtimeout="5"
>
<!-- resources within pool -->
</pool>
</resources>
or
<resources id="gst">
<pool xref="gst.ldap"/>
</resources>
In parser:
my $xp = XML::XPath(filename => 'resources.xml');
my $prefix = $xp -> findvalue('/resources/@id');
my $pools = $xp -> find('/resources/pool');
foreach my $node ($pools -> get_nodelist) {
my $loadbalancer =
Uttu::Resource::pool -> parse($prefix, $xp, $node);
# do something with ResourcePool::LoadBalancer object
}
DESCRIPTION
ATTRIBUTES
id
This required attribute identifies the resource pool.
maxtry
The maximum number of retries.
policy
sleeponfail
suspendtimeout
weight
xref
This refers to a resource pool defined elsewhere. The reference string is the fully qualified id of the pool, beginning with the id
attribute of the <resources/> element.
Only suspendtimeout
and weight
are used in conjunction with xref
.
BUGS
Please report bugs to either the request tracker for CPAN (http://rt.cpan.org/) or on the SourceForge project (http://sourceforge.net/projects/gestinanna/).
AUTHOR
James Smith, <jsmith@cpan.org>