.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Gearman::Objects 3pm" .TH Gearman::Objects 3pm "2018-08-30" "perl v5.26.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" Gearman::Objects \- a parent class for Gearman::Client and Gearman::Worker .SH "METHODS" .IX Header "METHODS" .SS "job_servers([$job_servers])" .IX Subsection "job_servers([$job_servers])" Initialize the list of job servers. \&\f(CW$job_servers\fRshould be array or array reference of hash references or stringified job servers. If the port number is not provided, \f(CW4730\fR is used as the default. For example: .PP .Vb 1 \& C<< $client\->job_servers(\*(Aq127.0.0.1\*(Aq, { host => "192.168.1.100", port => 4730 }); >> .Ve .PP \&\fBreturn\fR \f(CW\*(C`[job_servers]\*(C'\fR .SS "set_job_servers($js)" .IX Subsection "set_job_servers($js)" set job_servers attribute by canonicalized \f(CW$js\fR .SS "canonicalize_job_servers($js)" .IX Subsection "canonicalize_job_servers($js)" \&\f(CW$js\fR a string, hash reference or array reference of aforementioned. .PP Hash reference should contain at least host key. .PP All keys: host, port (4730 on default), use_ssl, ca_file, cert_file, key_file, socket_cb .PP \&\fBreturn\fR [canonicalized list] .SS "func($func)" .IX Subsection "func($func)" \&\fBreturn\fR \f(CW\*(C`join $prefix_separator, $prefix, $func\*(C'\fR .SS "prefix([$prefix])" .IX Subsection "prefix([$prefix])" get/set the namespace / prefix for the function names. .SS "prefix_separator([$separator])" .IX Subsection "prefix_separator([$separator])" getter/setter .PP default: \*(L"\et\*(R" .PP \&\fIIf gearmand uses memcached persistent queue type, override default separator to insure jobs recovery\fR .SS "socket($js, [$timeout])" .IX Subsection "socket($js, [$timeout])" depends on \f(CW\*(C`use_ssl\*(C'\fR prepare IO::Socket::IP or IO::Socket::SSL .IP "\(bu" 4 \&\f(CW$host_port\fR peer address .IP "\(bu" 4 \&\f(CW$timeout\fR default: 1 .PP \&\fBreturn\fR depends on \f(CW\*(C`use_ssl\*(C'\fR IO::Socket::(IP|SSL) on success .SS "sock_nodelay($sock)" .IX Subsection "sock_nodelay($sock)" set \s-1TCP_NODELAY\s0 on \f(CW$sock\fR, die on failure