PHP Интерфейс Predis\Cluster\Distributor\DistributorInterface

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

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

Метод Описание
add ( mixed $node, integer $weight = null ) Adds a node to the distributor with an optional weight.
get ( string $value ) : mixed Returns a node from the distributor mapping to the specified value.
getByHash ( mixed $hash ) : mixed Returns a node from the distributor using the computed hash of a key.
getBySlot ( mixed $slot ) : mixed | null Returns a node from the distributor using its assigned slot ID.
getHashGenerator ( ) : Predis\Cluster\Hash\HashGeneratorInterface Returns the underlying hash generator instance.
getSlot ( mixed $hash ) : mixed Returns the corresponding slot of a node from the distributor using the computed hash of a key.
remove ( mixed $node ) Removes a node from the distributor.

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

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

Adds a node to the distributor with an optional weight.
public add ( mixed $node, integer $weight = null )
$node mixed Node object.
$weight integer Weight for the node.

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

Returns a node from the distributor mapping to the specified value.
public get ( string $value ) : mixed
$value string
Результат mixed

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

Returns a node from the distributor using the computed hash of a key.
public getByHash ( mixed $hash ) : mixed
$hash mixed
Результат mixed

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

Returns a node from the distributor using its assigned slot ID.
public getBySlot ( mixed $slot ) : mixed | null
$slot mixed
Результат mixed | null

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

Returns the underlying hash generator instance.
public getHashGenerator ( ) : Predis\Cluster\Hash\HashGeneratorInterface
Результат Predis\Cluster\Hash\HashGeneratorInterface

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

Returns the corresponding slot of a node from the distributor using the computed hash of a key.
public getSlot ( mixed $hash ) : mixed
$hash mixed
Результат mixed

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

Removes a node from the distributor.
public remove ( mixed $node )
$node mixed Node object.