PHP Класс Predis\Pipeline\Pipeline

Автор: Daniele Alessandri ([email protected])
Наследование: implements Predis\ClientContextInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__call ( string $method, array $arguments ) Queues a command into the pipeline buffer.
__construct ( Predis\ClientInterface $client )
execute ( mixed $callable = null ) : array Handles the actual execution of the whole pipeline.
executeCommand ( Predis\Command\CommandInterface $command ) Queues a command instance into the pipeline buffer.
flushPipeline ( boolean $send = true ) Flushes the buffer holding all of the commands queued so far.
getClient ( ) : Predis\ClientInterface Returns the underlying client instance used by the pipeline object.

Защищенные методы

Метод Описание
exception ( Predis\Connection\ConnectionInterface $connection, Predis\Response\ErrorInterface $response ) Throws an exception on -ERR responses returned by Redis.
executePipeline ( Predis\Connection\ConnectionInterface $connection, SplQueue $commands ) : array Implements the logic to flush the queued commands and read the responses from the current connection.
getConnection ( ) : Predis\Connection\ConnectionInterface Returns the underlying connection to be used by the pipeline.
recordCommand ( Predis\Command\CommandInterface $command ) Queues a command instance into the pipeline buffer.
throwServerExceptions ( ) : boolean Returns if the pipeline should throw exceptions on server errors.

Приватные методы

Метод Описание
setRunning ( boolean $bool ) Marks the running status of the pipeline.

Описание методов

__call() публичный Метод

Queues a command into the pipeline buffer.
public __call ( string $method, array $arguments )
$method string Command ID.
$arguments array Arguments for the command.

__construct() публичный Метод

public __construct ( Predis\ClientInterface $client )
$client Predis\ClientInterface Client instance used by the context.

exception() защищенный Метод

Throws an exception on -ERR responses returned by Redis.
protected exception ( Predis\Connection\ConnectionInterface $connection, Predis\Response\ErrorInterface $response )
$connection Predis\Connection\ConnectionInterface Redis connection that returned the error.
$response Predis\Response\ErrorInterface Instance of the error response.

execute() публичный Метод

Handles the actual execution of the whole pipeline.
public execute ( mixed $callable = null ) : array
$callable mixed Optional callback for execution.
Результат array

executeCommand() публичный Метод

Queues a command instance into the pipeline buffer.
public executeCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface Command instance to be queued in the buffer.

executePipeline() защищенный Метод

Implements the logic to flush the queued commands and read the responses from the current connection.
protected executePipeline ( Predis\Connection\ConnectionInterface $connection, SplQueue $commands ) : array
$connection Predis\Connection\ConnectionInterface Current connection instance.
$commands SplQueue Queued commands.
Результат array

flushPipeline() публичный Метод

Flushes the buffer holding all of the commands queued so far.
public flushPipeline ( boolean $send = true )
$send boolean Specifies if the commands in the buffer should be sent to Redis.

getClient() публичный Метод

Returns the underlying client instance used by the pipeline object.
public getClient ( ) : Predis\ClientInterface
Результат Predis\ClientInterface

getConnection() защищенный Метод

Returns the underlying connection to be used by the pipeline.
protected getConnection ( ) : Predis\Connection\ConnectionInterface
Результат Predis\Connection\ConnectionInterface

recordCommand() защищенный Метод

Queues a command instance into the pipeline buffer.
protected recordCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface Command to be queued in the buffer.

throwServerExceptions() защищенный Метод

Returns if the pipeline should throw exceptions on server errors.
protected throwServerExceptions ( ) : boolean
Результат boolean