Downloads
Documentation
Get Involved
Help
Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Enumerations
Errors
Exceptions
Fibers
Generators
Attributes
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Predefined Attributes
Context options and parameters
Supported Protocols and Wrappers
Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
User Submitted Data
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Command line usage
Garbage Collection
DTrace Dynamic Tracing
Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions
Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
g p
Previous man page
g n
Next man page
G
Scroll to bottom
g g
Scroll to top
g h
Goto homepage
g s
Goto search
(current page)
/
Focus search box
简介 »
« FTP\Connection
PHP 手册
函数参考
其它服务
Change language:
English
Chinese (Simplified)
Other
Gearman
简介
安装/配置
需求
安装
运行时配置
资源类型
预定义常量
示例
Basic usage
Basic Gearman client and worker, background
Basic Gearman client and worker, submitting tasks
GearmanClient
— The GearmanClient class
GearmanClient::addOptions
— Add client options
GearmanClient::addServer
— Add a job server to the client
GearmanClient::addServers
— Add a list of job servers to the client
GearmanClient::addTask
— Add a task to be run in parallel
GearmanClient::addTaskBackground
— Add a background task to be run in parallel
GearmanClient::addTaskHigh
— Add a high priority task to run in parallel
GearmanClient::addTaskHighBackground
— Add a high priority background task to be run in parallel
GearmanClient::addTaskLow
— Add a low priority task to run in parallel
GearmanClient::addTaskLowBackground
— Add a low priority background task to be run in parallel
GearmanClient::addTaskStatus
— Add a task to get status
GearmanClient::clearCallbacks
— Clear all task callback functions
GearmanClient::clone
— Create a copy of a GearmanClient object
GearmanClient::__construct
— Create a GearmanClient instance
GearmanClient::context
— Get the application context
GearmanClient::data
— Get the application data (deprecated)
GearmanClient::do
— Run a single task and return a result [deprecated]
GearmanClient::doBackground
— Run a task in the background
GearmanClient::doHigh
— Run a single high priority task
GearmanClient::doHighBackground
— Run a high priority task in the background
GearmanClient::doJobHandle
— Get the job handle for the running task
GearmanClient::doLow
— Run a single low priority task
GearmanClient::doLowBackground
— Run a low priority task in the background
GearmanClient::doNormal
— Run a single task and return a result
GearmanClient::doStatus
— Get the status for the running task
GearmanClient::echo
— Send data to all job servers to see if they echo it back [deprecated]
GearmanClient::error
— Returns an error string for the last error encountered
GearmanClient::getErrno
— Get an errno value
GearmanClient::jobStatus
— Get the status of a background job
GearmanClient::ping
— Send data to all job servers to see if they echo it back
GearmanClient::removeOptions
— Remove client options
GearmanClient::returnCode
— Get the last Gearman return code
GearmanClient::runTasks
— Run a list of tasks in parallel
GearmanClient::setClientCallback
— Callback function when there is a data packet for a task (deprecated)
GearmanClient::setCompleteCallback
— Set a function to be called on task completion
GearmanClient::setContext
— Set application context
GearmanClient::setCreatedCallback
— Set a callback for when a task is queued
GearmanClient::setData
— Set application data (deprecated)
GearmanClient::setDataCallback
— Callback function when there is a data packet for a task
GearmanClient::setExceptionCallback
— Set a callback for worker exceptions
GearmanClient::setFailCallback
— Set callback for job failure
GearmanClient::setOptions
— Set client options
GearmanClient::setStatusCallback
— Set a callback for collecting task status
GearmanClient::setTimeout
— Set socket I/O activity timeout
GearmanClient::setWarningCallback
— Set a callback for worker warnings
GearmanClient::setWorkloadCallback
— Set a callback for accepting incremental data updates
GearmanClient::timeout
— Get current socket I/O activity timeout value
GearmanClient::wait
— Wait for I/O activity on all connections in a client
GearmanJob
— The GearmanJob class
GearmanJob::complete
— Send the result and complete status (deprecated)
GearmanJob::__construct
— Create a GearmanJob instance
GearmanJob::data
— Send data for a running job (deprecated)
GearmanJob::exception
— Send exception for running job (deprecated)
GearmanJob::fail
— Send fail status (deprecated)
GearmanJob::functionName
— Get function name
GearmanJob::handle
— Get the job handle
GearmanJob::returnCode
— Get last return code
GearmanJob::sendComplete
— Send the result and complete status
GearmanJob::sendData
— Send data for a running job
GearmanJob::sendException
— Send exception for running job (exception)
GearmanJob::sendFail
— Send fail status
GearmanJob::sendStatus
— Send status
GearmanJob::sendWarning
— Send a warning
GearmanJob::setReturn
— Set a return value
GearmanJob::status
— Send status (deprecated)
GearmanJob::unique
— Get the unique identifier
GearmanJob::warning
— Send a warning (deprecated)
GearmanJob::workload
— Get workload
GearmanJob::workloadSize
— Get size of work load
GearmanTask
— The GearmanTask class
GearmanTask::__construct
— Create a GearmanTask instance
GearmanTask::create
— Create a task (deprecated)
GearmanTask::data
— Get data returned for a task
GearmanTask::dataSize
— Get the size of returned data
GearmanTask::function
— Get associated function name (deprecated)
GearmanTask::functionName
— Get associated function name
GearmanTask::isKnown
— Determine if task is known
GearmanTask::isRunning
— Test whether the task is currently running
GearmanTask::jobHandle
— Get the job handle
GearmanTask::recvData
— Read work or result data into a buffer for a task
GearmanTask::returnCode
— Get the last return code
GearmanTask::sendData
— Send data for a task (deprecated)
GearmanTask::sendWorkload
— Send data for a task
GearmanTask::taskDenominator
— Get completion percentage denominator
GearmanTask::taskNumerator
— Get completion percentage numerator
GearmanTask::unique
— Get the unique identifier for a task
GearmanTask::uuid
— Get the unique identifier for a task (deprecated)
GearmanWorker
— The GearmanWorker class
GearmanWorker::addFunction
— Register and add callback function
GearmanWorker::addOptions
— Add worker options
GearmanWorker::addServer
— Add a job server
GearmanWorker::addServers
— Add job servers
GearmanWorker::clone
— Create a copy of the worker
GearmanWorker::__construct
— Create a GearmanWorker instance
GearmanWorker::echo
— Test job server response
GearmanWorker::error
— Get the last error encountered
GearmanWorker::getErrno
— Get errno
GearmanWorker::options
— Get worker options
GearmanWorker::register
— Register a function with the job server
GearmanWorker::removeOptions
— Remove worker options
GearmanWorker::returnCode
— Get last Gearman return code
GearmanWorker::setId
— Give the worker an identifier so it can be tracked when asking gearmand for the list of available workers
GearmanWorker::setOptions
— Set worker options
GearmanWorker::setTimeout
— Set socket I/O activity timeout
GearmanWorker::timeout
— Get socket I/O activity timeout
GearmanWorker::unregister
— Unregister a function name with the job servers
GearmanWorker::unregisterAll
— Unregister all function names with the job servers
GearmanWorker::wait
— Wait for activity from one of the job servers
GearmanWorker::work
— Wait for and perform jobs
GearmanException
— The GearmanException class
Improve This Page
Learn How To Improve This Page
•
Submit a Pull Request
•
Report a Bug
+
add a note
User Contributed Notes
There are no user contributed notes for this page.