.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Tirex::Manager::Bucket 3pm" .TH Tirex::Manager::Bucket 3pm 2024-05-06 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Tirex::Manager::Bucket \- Rendering buckets for different priorities .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Tirex::Manager::Bucket; \& my $bucket = Tirex::Manager::Bucket\->new( name => \*(Aqtest\*(Aq, minprio => 1, maxproc => 8, maxload => 20 ); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" To simplify the configuration of rendering parameters for different zoom levels, they are configured through Buckets. One Bucket contains the configuration for a range of zoom levels. .SH METHODS .IX Header "METHODS" .ie n .SS "Tirex::Manager::Bucket\->new( name => $name, minprio => $minprio, maxproc => $maxproc, maxload => $maxload )" .el .SS "Tirex::Manager::Bucket\->new( name => \f(CW$name\fP, minprio => \f(CW$minprio\fP, maxproc => \f(CW$maxproc\fP, maxload => \f(CW$maxload\fP )" .IX Subsection "Tirex::Manager::Bucket->new( name => $name, minprio => $minprio, maxproc => $maxproc, maxload => $maxload )" Create new rendering bucket. .ie n .SS $bucket\->add_job($job) .el .SS \f(CW$bucket\fP\->add_job($job) .IX Subsection "$bucket->add_job($job)" Add a Tirex::Job to bucket. .ie n .SS $bucket\->remove_job($job) .el .SS \f(CW$bucket\fP\->remove_job($job) .IX Subsection "$bucket->remove_job($job)" Remove a Tirex::Job from bucket. .ie n .SS $bucket\->\fBget_name()\fP .el .SS \f(CW$bucket\fP\->\fBget_name()\fP .IX Subsection "$bucket->get_name()" Get name of bucket. .ie n .SS $bucket\->\fBget_numproc()\fP .el .SS \f(CW$bucket\fP\->\fBget_numproc()\fP .IX Subsection "$bucket->get_numproc()" Returns the number of rendering processes currently working on jobs in this bucket. .ie n .SS $bucket\->\fBget_minprio()\fP .el .SS \f(CW$bucket\fP\->\fBget_minprio()\fP .IX Subsection "$bucket->get_minprio()" Get minimum priority for this bucket. .ie n .SS $bucket\->\fBget_maxprio()\fP .el .SS \f(CW$bucket\fP\->\fBget_maxprio()\fP .IX Subsection "$bucket->get_maxprio()" Get maximum priority for this bucket. The maximum priority has to be set with \&\fBset_maxprio()\fR before this works. .ie n .SS $bucket\->set_maxprio($maxprio) .el .SS \f(CW$bucket\fP\->set_maxprio($maxprio) .IX Subsection "$bucket->set_maxprio($maxprio)" Set maximum priority for this bucket. .ie n .SS $bucket\->\fBget_active()\fP .el .SS \f(CW$bucket\fP\->\fBget_active()\fP .IX Subsection "$bucket->get_active()" Get active flag for this bucket. .ie n .SS $bucket\->set_active($active) .el .SS \f(CW$bucket\fP\->set_active($active) .IX Subsection "$bucket->set_active($active)" Set active flag for this bucket. .ie n .SS $bucket\->for_prio($prio) .el .SS \f(CW$bucket\fP\->for_prio($prio) .IX Subsection "$bucket->for_prio($prio)" Check whether this bucket is the right one for the given priority, ie. whether the priority is between min\- and maxprio. .ie n .SS "$bucket\->can_render($num_rendering, $current_load)" .el .SS "\f(CW$bucket\fP\->can_render($num_rendering, \f(CW$current_load\fP)" .IX Subsection "$bucket->can_render($num_rendering, $current_load)" Finds out if a job in this rendering bucket can be rendered. .PP Returns .PP .Vb 4 \& 1 if it can be rendered \& 0 if there are already maxproc or more rendering processes \& or if bucket is not active \& undef if the load is higher or equal than maxload .Ve .ie n .SS "$bucket\->status($num_rendering, $current_load)" .el .SS "\f(CW$bucket\fP\->status($num_rendering, \f(CW$current_load\fP)" .IX Subsection "$bucket->status($num_rendering, $current_load)" Return status of bucket.