Files
predis/lib/Predis/Pipeline/PipelineExecutorInterface.php
T
Daniele Alessandri 8a84f8b6cf Optimize command pipelines.
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.
2012-05-15 12:42:26 +02:00

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);
}