PHP Класс Predis\Transaction\MultiExec

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

Защищенные свойства (Protected)

Свойство Тип Описание
$attempts
$client
$commands
$exceptions
$modeCAS
$watchKeys

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

Метод Описание
__call ( string $method, array $arguments ) : mixed Dynamically invokes a Redis command with the specified arguments.
__construct ( Predis\ClientInterface $client, array $options = null )
discard ( ) : MultiExec Resets the transaction by UNWATCH-ing the keys that are being WATCHed and DISCARD-ing pending commands that have been already sent to the server.
exec ( ) : mixed Executes the whole transaction.
execute ( mixed $callable = null ) : array Handles the actual execution of the whole transaction.
executeCommand ( Predis\Command\CommandInterface $command ) Executes the specified Redis command.
multi ( ) : MultiExec Finalizes the transaction by executing MULTI on the server.
unwatch ( ) : MultiExec Executes UNWATCH.
watch ( string | array $keys ) : mixed Executes WATCH against one or more keys.

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

Метод Описание
call ( string $commandID, array $arguments = [] ) : mixed Executes a Redis command bypassing the transaction logic.
configure ( Predis\ClientInterface $client, array $options ) Configures the transaction using the provided options.
executeTransactionBlock ( mixed $callable ) Passes the current transaction object to a callable block for execution.
initialize ( ) Initializes the transaction context.
reset ( ) Resets the state of the transaction.

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

Метод Описание
assertClient ( Predis\ClientInterface $client ) Checks if the passed client instance satisfies the required conditions needed to initialize the transaction object.
checkBeforeExecution ( mixed $callable ) Checks the state of the transaction before execution.
onProtocolError ( string $message ) Helper method for protocol errors encountered inside the transaction.

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

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

Dynamically invokes a Redis command with the specified arguments.
public __call ( string $method, array $arguments ) : mixed
$method string Command ID.
$arguments array Arguments for the command.
Результат mixed

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

public __construct ( Predis\ClientInterface $client, array $options = null )
$client Predis\ClientInterface Client instance used by the transaction.
$options array Initialization options.

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

Executes a Redis command bypassing the transaction logic.
protected call ( string $commandID, array $arguments = [] ) : mixed
$commandID string Command ID.
$arguments array Arguments for the command.
Результат mixed

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

Configures the transaction using the provided options.
protected configure ( Predis\ClientInterface $client, array $options )
$client Predis\ClientInterface Underlying client instance.
$options array Array of options for the transaction.

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

Resets the transaction by UNWATCH-ing the keys that are being WATCHed and DISCARD-ing pending commands that have been already sent to the server.
public discard ( ) : MultiExec
Результат MultiExec

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

Executes the whole transaction.
public exec ( ) : mixed
Результат mixed

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

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

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

Executes the specified Redis command.
public executeCommand ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface Command instance.

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

Passes the current transaction object to a callable block for execution.
protected executeTransactionBlock ( mixed $callable )
$callable mixed Callback.

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

Initializes the transaction context.
protected initialize ( )

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

Finalizes the transaction by executing MULTI on the server.
public multi ( ) : MultiExec
Результат MultiExec

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

Resets the state of the transaction.
protected reset ( )

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

Executes UNWATCH.
public unwatch ( ) : MultiExec
Результат MultiExec

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

Executes WATCH against one or more keys.
public watch ( string | array $keys ) : mixed
$keys string | array One or more keys.
Результат mixed

Описание свойств

$attempts защищенное свойство

protected $attempts

$client защищенное свойство

protected $client

$commands защищенное свойство

protected $commands

$exceptions защищенное свойство

protected $exceptions

$modeCAS защищенное свойство

protected $modeCAS

$watchKeys защищенное свойство

protected $watchKeys