Свойство | Type | Description | |
---|---|---|---|
$disallowed | |||
$readonly | |||
$readonlySHA1 |
Méthode | Description | |
---|---|---|
__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. |
Méthode | Description | |
---|---|---|
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. |
protected getDisallowedOperations ( ) : array | ||
Résultat | array |
protected getReadOnlyOperations ( ) : array | ||
Résultat | array |
protected isBitfieldReadOnly ( Predis\Command\CommandInterface $command ) : boolean | ||
$command | Predis\Command\CommandInterface | Command instance. |
Résultat | boolean |
public isDisallowedOperation ( Predis\Command\CommandInterface $command ) : boolean | ||
$command | Predis\Command\CommandInterface | Command instance. |
Résultat | boolean |
protected isGeoradiusReadOnly ( Predis\Command\CommandInterface $command ) : boolean | ||
$command | Predis\Command\CommandInterface | Command instance. |
Résultat | boolean |
public isReadOperation ( Predis\Command\CommandInterface $command ) : boolean | ||
$command | Predis\Command\CommandInterface | Command instance. |
Résultat | boolean |
protected isSortReadOnly ( Predis\Command\CommandInterface $command ) : boolean | ||
$command | Predis\Command\CommandInterface | Command instance. |
Résultat | boolean |
public setCommandReadOnly ( string $commandID, mixed $readonly = true ) | ||
$commandID | string | Command ID. |
$readonly | mixed | A boolean value or a callable object. |
public setScriptReadOnly ( string $script, mixed $readonly = true ) | ||
$script | string | Body of the Lua script. |
$readonly | mixed | A boolean value or a callable object. |