PHP 클래스 Predis\Pipeline\Pipeline

저자: Daniele Alessandri ([email protected])
상속: implements Predis\ClientContextInterface
파일 보기 프로젝트 열기: nrk/predis 1 사용 예제들

공개 메소드들

메소드 설명
__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