PHP Класс Predis\Replication\ReplicationStrategy

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

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

Свойство Тип Описание
$disallowed
$readonly
$readonlySHA1

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

Метод Описание
__construct ( )
isDisallowedOperation ( Predis\Command\CommandInterface $command ) : boolean Returns if the specified command is not allowed for execution in a master slave replication context.
isReadOperation ( Predis\Command\CommandInterface $command ) : boolean Returns if the specified command will perform a read-only operation on Redis or not.
setCommandReadOnly ( string $commandID, mixed $readonly = true ) Marks a command as a read-only operation.
setScriptReadOnly ( string $script, mixed $readonly = true ) Marks a Lua script for EVAL and EVALSHA as a read-only operation. When the behaviour of a script can be decided only at runtime depending on its arguments, a callable object can be provided to dynamically check if the passed instance of EVAL or EVALSHA performs write operations or not.

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

Метод Описание
getDisallowedOperations ( ) : array Returns the default list of disallowed commands.
getReadOnlyOperations ( ) : array Returns the default list of commands performing read-only operations.
isBitfieldReadOnly ( Predis\Command\CommandInterface $command ) : boolean Checks if BITFIELD performs a read-only operation by looking for certain SET and INCRYBY modifiers in the arguments array of the command.
isGeoradiusReadOnly ( Predis\Command\CommandInterface $command ) : boolean Checks if a GEORADIUS command is a readable operation by parsing the arguments array of the specified commad instance.
isSortReadOnly ( Predis\Command\CommandInterface $command ) : boolean Checks if a SORT command is a readable operation by parsing the arguments array of the specified commad instance.

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

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

public __construct ( )

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

Returns the default list of disallowed commands.
protected getDisallowedOperations ( ) : array
Результат array

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

Returns the default list of commands performing read-only operations.
protected getReadOnlyOperations ( ) : array
Результат array

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

Checks if BITFIELD performs a read-only operation by looking for certain SET and INCRYBY modifiers in the arguments array of the command.
protected isBitfieldReadOnly ( Predis\Command\CommandInterface $command ) : boolean
$command Predis\Command\CommandInterface Command instance.
Результат boolean

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

Returns if the specified command is not allowed for execution in a master slave replication context.
public isDisallowedOperation ( Predis\Command\CommandInterface $command ) : boolean
$command Predis\Command\CommandInterface Command instance.
Результат boolean

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

Checks if a GEORADIUS command is a readable operation by parsing the arguments array of the specified commad instance.
protected isGeoradiusReadOnly ( Predis\Command\CommandInterface $command ) : boolean
$command Predis\Command\CommandInterface Command instance.
Результат boolean

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

Returns if the specified command will perform a read-only operation on Redis or not.
public isReadOperation ( Predis\Command\CommandInterface $command ) : boolean
$command Predis\Command\CommandInterface Command instance.
Результат boolean

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

Checks if a SORT command is a readable operation by parsing the arguments array of the specified commad instance.
protected isSortReadOnly ( Predis\Command\CommandInterface $command ) : boolean
$command Predis\Command\CommandInterface Command instance.
Результат boolean

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

When the behavior of a command can be decided only at runtime depending on its arguments, a callable object can be provided to dynamically check if the specified command performs a read or a write operation.
public setCommandReadOnly ( string $commandID, mixed $readonly = true )
$commandID string Command ID.
$readonly mixed A boolean value or a callable object.

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

Marks a Lua script for EVAL and EVALSHA as a read-only operation. When the behaviour of a script can be decided only at runtime depending on its arguments, a callable object can be provided to dynamically check if the passed instance of EVAL or EVALSHA performs write operations or not.
public setScriptReadOnly ( string $script, mixed $readonly = true )
$script string Body of the Lua script.
$readonly mixed A boolean value or a callable object.

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

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

protected $disallowed

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

protected $readonly

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

protected $readonlySHA1