File: constants.xml

package info (click to toggle)
php-doc 20100521-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 59,992 kB
  • ctags: 4,085
  • sloc: xml: 796,833; php: 21,338; cpp: 500; sh: 117; makefile: 58; awk: 28
file content (580 lines) | stat: -rw-r--r-- 14,363 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 294364 $ -->

<appendix xml:id="gearman.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 &reftitle.constants;
 &extension.constants;
 <para>
  Return values.  Always check <methodname>GearmanClient::error</methodname> or 
  <methodname>GearmanWorker</methodname> for a string error, as it may contain
  more details:
 </para>
 <para>
  <variablelist>
   <varlistentry>
    <term>
     <constant>GEARMAN_SUCCESS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Whatever action was taken was successful.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_IO_WAIT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      When in non-blocking mode, an event is hit that would have blocked.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_ERRNO</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      A system error.  Check <methodname>GearmanClient::errno</methodname> or
      <methodname>GearmanWorker::errno</methodname> for the system error code that
      was returned.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_NO_ACTIVE_FDS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      <methodname>GearmanClient::wait</methodname> or <methodname>GearmanWorker</methodname> was
      called with no connections.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_UNEXPECTED_PACKET</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Indicates something going very wrong in gearmand.  Applies only to
      <classname>GearmanWorker</classname>.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_GETADDRINFO</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      DNS resolution failed (invalid host, port, etc).
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_NO_SERVERS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Did not call <methodname>GearmanClient::addServer</methodname> before submitting jobs
      or tasks.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_LOST_CONNECTION</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Lost a connection during a request.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_MEMORY_ALLOCATION_FAILURE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Memory allocation failed (ran out of memory).
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_SERVER_ERROR</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Something went wrong in the Gearman server and it could not handle the
      request gracefully.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORK_DATA</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
      when using <methodname>GearmanClient::do</methodname>.  Sent to update the client
      with data from a running job.  A worker uses this when it needs to send updates,
      send partial results, or flush data during long running jobs.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORK_WARNING</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
      when using <methodname>GearmanClient::do</methodname>.  Updates the client with
      a warning.  The behavior is just like <constant>GEARMAN_WORK_DATA</constant>, but
      should be treated as a warning instead of normal response data.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORK_STATUS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
      when using <methodname>GearmanClient::do</methodname>. Sent to update the status
      of a long running job. Use <methodname>GearmanClient::doStatus</methodname> to obtain
      the percentage complete of the task.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORK_EXCEPTION</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
      when using <methodname>GearmanClient::do</methodname>. Indicates that a job failed
      with a given exception.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORK_FAIL</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Notice return code obtained with <methodname>GearmanClient::returnCode</methodname>
      when using <methodname>GearmanClient::do</methodname>. Indicates that the job failed.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_COULD_NOT_CONNECT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Failed to connect to servers.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_INVALID_FUNCTION_NAME</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Trying to register a function name of NULL or using the callback interface
      without specifying callbacks.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_INVALID_WORKER_FUNCTION</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Trying to register a function with a NULL callback function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_NO_REGISTERED_FUNCTIONS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      When a worker gets a job for a function it did not register.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_NO_JOBS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      For a non-blocking worker, when <methodname>GearmanWorker::work</methodname> does not have
      any active jobs.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_ECHO_DATA_CORRUPTION</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      After <methodname>GearmanClient::echo</methodname> or <methodname>GearmanWorker::echo</methodname>
      the data returned doesn't match the data sent.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_NEED_WORKLOAD_FN</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      When the client opted to stream the workload of a task, but did not
      specify a workload callback function.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_PAUSE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      For the non-blocking client task interface, can be returned from the task callback
      to "pause" the call and return from <methodname>GearmanClient::runTasks</methodname>.
      Call <methodname>GearmanClient::runTasks</methodname> again to continue.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_UNKNOWN_STATE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Internal client/worker state error.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_SEND_BUFFER_TOO_SMALL</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Internal error: trying to flush more data in one atomic chunk than is possible
      due to hard-coded buffer sizes.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_TIMEOUT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Hit the timeout limit set by the client/worker.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
 </para>

 <para>
  <classname>GearmanClient</classname> options:
 </para>
 <para>
  <variablelist>
   <varlistentry>
    <term>
     <constant>GEARMAN_CLIENT_NON_BLOCKING</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Run the cient in a non-blocking mode.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_CLIENT_UNBUFFERED_RESULT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Allow the client to read data in chunks rather than have the library
      buffer the entire data result and pass that back.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_CLIENT_FREE_TASKS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Automatically free task objects once they are complete.  This is the default
      setting in this extension to prevent memory leaks.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
 </para>

 <para>
  <classname>GearmanWorker</classname> options:
 </para>
 <para>
  <variablelist>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORKER_NON_BLOCKING</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Run the worker in non-blocking mode.
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORKER_GRAB_UNIQ</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
      Return the client assigned unique ID in addition to the job handle.
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
 </para>

 <para>
  Base Gearman configuration:
 </para>
 <para>
  <variablelist>
   <varlistentry>
    <term>
     <constant>GEARMAN_DEFAULT_TCP_HOST</constant>
     (<type>string</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_DEFAULT_TCP_PORT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_DEFAULT_SOCKET_TIMEOUT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_DEFAULT_SOCKET_SEND_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_DEFAULT_SOCKET_RECV_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_MAX_ERROR_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_PACKET_HEADER_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_JOB_HANDLE_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_OPTION_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_UNIQUE_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_MAX_COMMAND_ARGS</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_ARGS_BUFFER_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_SEND_BUFFER_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_RECV_BUFFER_SIZE</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>
     <constant>GEARMAN_WORKER_WAIT_TIMEOUT</constant>
     (<type>integer</type>)
    </term>
    <listitem>
     <simpara>
     </simpara>
    </listitem>
   </varlistentry>
  </variablelist>
 </para>
</appendix>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->