mirror of
https://github.com/predis/predis.git
synced 2026-08-25 07:09:37 +00:00
8a84f8b6cf
Using SplQueue instead of a plain PHP array to queue command instance in the pipeline is faster and makes the underlying implementation definitely more clean. This change is not going to be backported to Predis v0.7 due to changes in Predis\Pipeline\PipelineContextInterface.
34 lines
863 B
PHP
34 lines
863 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Predis package.
|
|
*
|
|
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Predis\Pipeline;
|
|
|
|
use SplQueue;
|
|
use Predis\Connection\ConnectionInterface;
|
|
|
|
/**
|
|
* Defines a strategy to write a list of commands to the network
|
|
* and read back their replies.
|
|
*
|
|
* @author Daniele Alessandri <suppakilla@gmail.com>
|
|
*/
|
|
interface PipelineExecutorInterface
|
|
{
|
|
/**
|
|
* Writes a list of commands to the network and reads back their replies.
|
|
*
|
|
* @param ConnectionInterface $connection Connection to Redis.
|
|
* @param SplQueue $commands Commands queued for execution.
|
|
* @return array
|
|
*/
|
|
public function execute(ConnectionInterface $connection, SplQueue $commands);
|
|
}
|