The GearmanClient class

(PECL gearman >= 0.5.0)

Giriş

Represents a class for connecting to a Gearman job server and making requests to perform some function on provided data. The function performed must be one registered by a Gearman worker and the data passed is opaque to the job server.

Sınıf Sözdizimi

class GearmanClient {
/* Yöntemler */
public function __construct()
public function addOptions(int $option): bool
public function addServer(string $host = null, int $port = 0, bool $setupExceptionHandler = true): bool
public function addServers(string $servers = null, bool $setupExceptionHandler = true): bool
public function addTask(
    string $function_name,
    string|int|float $workload,
    mixed $context = null,
    ?string $unique_key = null
): GearmanTask|false
public function addTaskBackground(
    string $function_name,
    string|int|float $workload,
    mixed $context = null,
    ?string $unique_key = null
): GearmanTask|false
public function addTaskHigh(
    string $function_name,
    string|int|float $workload,
    mixed $context = null,
    ?string $unique_key = null
): GearmanTask|false
public function addTaskHighBackground(
    string $function_name,
    string|int|float $workload,
    mixed $context = null,
    ?string $unique_key = null
): GearmanTask|false
public function addTaskLow(
    string $function_name,
    string|int|float $workload,
    mixed $context = null,
    ?string $unique_key = null
): GearmanTask|false
public function addTaskLowBackground(
    string $function_name,
    string|int|float $workload,
    mixed $context = null,
    ?string $unique_key = null
): GearmanTask|false
public function addTaskStatus(string $job_handle, mixed $context = null): GearmanTask|false
public function clearCallbacks(): bool
public function context(): string
public function doBackground(string $function, string $workload, ?string $unique = null): string
public function doHigh(string $function, string $workload, ?string $unique = null): string
public function doHighBackground(string $function, string $workload, ?string $unique = null): string
public function doJobHandle(): string
public function doLow(string $function, string $workload, ?string $unique = null): string
public function doLowBackground(string $function, string $workload, ?string $unique = null): string
public function doNormal(string $function, string $workload, ?string $unique = null): string
public function doStatus(): array
public function error(): string|false
public function getErrno(): int
public function jobStatus(string $job_handle): array
public function ping(string $workload): bool
public function removeOptions(int $option): bool
public function returnCode(): int
public function runTasks(): bool
public function setCompleteCallback(callable $callback): bool
public function setContext(string $data): bool
public function setCreatedCallback(callable $callback): bool
public function setDataCallback(callable $callback): bool
public function setExceptionCallback(callable $callback): bool
public function setFailCallback(callable $callback): bool
public function setOptions(int $option): bool
public function setStatusCallback(callable $callback): bool
public function setTimeout(int $timeout): bool
public function setWarningCallback(callable $callback): bool
public function setWorkloadCallback(callable $callback): bool
public function timeout(): int
public function wait(): bool
}

İçindekiler

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top