Clase GearmanClient

(PECL gearman >= 0.5.0)

Introducción

Representa una clase para conectar a un servidor de trabajos Gearman y realizar peticiones para ejecutar alguna función con los datos proporcionados. La función ejecutada debe ser una de las registradas por un trabajador Gearman y los datos que se pasan son opacos al servidor de trabajos.

Sinopsis de la Clase

GearmanClient {
/* Métodos */
public addOptions ( int $options ) : bool
public addServer ([ string $host = 127.0.0.1 [, int $port = 4730 ]] ) : bool
public addServers ([ string $servers = 127.0.0.1:4730 ] ) : bool
public addTask ( string $function_name , string $workload [, mixed &$context [, string $unique ]] ) : GearmanTask
public addTaskBackground ( string $function_name , string $workload [, mixed &$context [, string $unique ]] ) : GearmanTask
public addTaskHigh ( string $function_name , string $workload [, mixed &$context [, string $unique ]] ) : GearmanTask
public addTaskHighBackground ( string $function_name , string $workload [, mixed &$context [, string $unique ]] ) : GearmanTask
public addTaskLow ( string $function_name , string $workload [, mixed &$context [, string $unique ]] ) : GearmanTask
public addTaskLowBackground ( string $function_name , string $workload [, mixed &$context [, string $unique ]] ) : GearmanTask
public addTaskStatus ( string $job_handle [, string &$context ] ) : GearmanTask
public clearCallbacks ( void ) : bool
public clone ( void ) : GearmanClient
public __construct ( void )
public context ( void ) : string
public data ( void ) : string
public do ( string $function_name , string $workload [, string $unique ] ) : string
public doBackground ( string $function_name , string $workload [, string $unique ] ) : string
public doHigh ( string $function_name , string $workload [, string $unique ] ) : string
public doHighBackground ( string $function_name , string $workload [, string $unique ] ) : string
public doJobHandle ( void ) : string
public doLow ( string $function_name , string $workload [, string $unique ] ) : string
public doLowBackground ( string $function_name , string $workload [, string $unique ] ) : string
public doNormal ( string $function_name , string $workload [, string $unique ] ) : string
public doStatus ( void ) : array
public echo ( string $workload ) : bool
public error ( void ) : string
public getErrno ( void ) : int
public jobStatus ( string $job_handle ) : array
public ping ( string $workload ) : bool
public removeOptions ( int $options ) : bool
public returnCode ( void ) : int
public runTasks ( void ) : bool
public setClientCallback ( callable $callback ) : void
public setCompleteCallback ( callable $callback ) : bool
public setContext ( string $context ) : bool
public setCreatedCallback ( string $callback ) : bool
public setData ( string $data ) : bool
public setDataCallback ( callable $callback ) : bool
public setExceptionCallback ( callable $callback ) : bool
public setFailCallback ( callable $callback ) : bool
public setOptions ( int $options ) : bool
public setStatusCallback ( callable $callback ) : bool
public setTimeout ( int $timeout ) : bool
public setWarningCallback ( callable $callback ) : bool
public setWorkloadCallback ( callable $callback ) : bool
public timeout ( void ) : int
}

Tabla de contenidos