PHP 클래스 Predis\Cluster\ClusterStrategy

저자: Daniele Alessandri ([email protected])
상속: implements Predis\Cluster\StrategyInterface
파일 보기 프로젝트 열기: tillkruss/redis-object-cache 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$commands

공개 메소드들

메소드 설명
__construct ( )
getSlot ( Predis\Command\CommandInterface $command )
getSupportedCommands ( ) : array Returns the list of IDs for the supported commands.
setCommandHandler ( string $commandID, mixed $callback = null ) Sets an handler for the specified command ID.

보호된 메소드들

메소드 설명
checkSameSlotForKeys ( array $keys ) : boolean Checks if the specified array of keys will generate the same hash.
extractKeyTag ( string $key ) : string Returns only the hashable part of a key (delimited by "{.
getDefaultCommands ( ) : array Returns the default map of supported commands with their handlers.
getKeyFromAllArguments ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from a command with multiple keys only when all keys in the arguments array produce the same hash.
getKeyFromBitOp ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from BITOP command.
getKeyFromBlockingListCommands ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from BLPOP and BRPOP commands.
getKeyFromFirstArgument ( Predis\Command\CommandInterface $command ) : string Extracts the key from the first argument of a command instance.
getKeyFromGeoradiusCommands ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from GEORADIUS and GEORADIUSBYMEMBER commands.
getKeyFromInterleavedArguments ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from a command with multiple keys only when all keys in the arguments array produce the same hash.
getKeyFromScriptingCommands ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from EVAL and EVALSHA commands.
getKeyFromSortCommand ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from SORT command.
getKeyFromZsetAggregationCommands ( Predis\Command\CommandInterface $command ) : string | null Extracts the key from ZINTERSTORE and ZUNIONSTORE commands.

메소드 상세

__construct() 공개 메소드

public __construct ( )

checkSameSlotForKeys() 보호된 메소드

Checks if the specified array of keys will generate the same hash.
protected checkSameSlotForKeys ( array $keys ) : boolean
$keys array Array of keys.
리턴 boolean

extractKeyTag() 보호된 메소드

..}"), or the whole key if a key tag is not found in the string.
protected extractKeyTag ( string $key ) : string
$key string A key.
리턴 string

getDefaultCommands() 보호된 메소드

Returns the default map of supported commands with their handlers.
protected getDefaultCommands ( ) : array
리턴 array

getKeyFromAllArguments() 보호된 메소드

Extracts the key from a command with multiple keys only when all keys in the arguments array produce the same hash.
protected getKeyFromAllArguments ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromBitOp() 보호된 메소드

Extracts the key from BITOP command.
protected getKeyFromBitOp ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromBlockingListCommands() 보호된 메소드

Extracts the key from BLPOP and BRPOP commands.
protected getKeyFromBlockingListCommands ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromFirstArgument() 보호된 메소드

Extracts the key from the first argument of a command instance.
protected getKeyFromFirstArgument ( Predis\Command\CommandInterface $command ) : string
$command Predis\Command\CommandInterface Command instance.
리턴 string

getKeyFromGeoradiusCommands() 보호된 메소드

Extracts the key from GEORADIUS and GEORADIUSBYMEMBER commands.
protected getKeyFromGeoradiusCommands ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromInterleavedArguments() 보호된 메소드

Extracts the key from a command with multiple keys only when all keys in the arguments array produce the same hash.
protected getKeyFromInterleavedArguments ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromScriptingCommands() 보호된 메소드

Extracts the key from EVAL and EVALSHA commands.
protected getKeyFromScriptingCommands ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromSortCommand() 보호된 메소드

Extracts the key from SORT command.
protected getKeyFromSortCommand ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getKeyFromZsetAggregationCommands() 보호된 메소드

Extracts the key from ZINTERSTORE and ZUNIONSTORE commands.
protected getKeyFromZsetAggregationCommands ( Predis\Command\CommandInterface $command ) : string | null
$command Predis\Command\CommandInterface Command instance.
리턴 string | null

getSlot() 공개 메소드

public getSlot ( Predis\Command\CommandInterface $command )
$command Predis\Command\CommandInterface

getSupportedCommands() 공개 메소드

Returns the list of IDs for the supported commands.
public getSupportedCommands ( ) : array
리턴 array

setCommandHandler() 공개 메소드

The signature of the callback must have a single parameter of type Predis\Command\CommandInterface. When the callback argument is omitted or NULL, the previously associated handler for the specified command ID is removed.
public setCommandHandler ( string $commandID, mixed $callback = null )
$commandID string Command ID.
$callback mixed A valid callable object, or NULL to unset the handler.

프로퍼티 상세

$commands 보호되어 있는 프로퍼티

protected $commands