The GearmanClient class

(PECL gearman >= 0.5.0)

Einführung

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.

Klassenbeschreibung

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

Inhaltsverzeichnis

add a note add a note

User Contributed Notes

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