PHP 인터페이스 Predis\Cluster\Distributor\DistributorInterface

저자: Daniele Alessandri ([email protected])
파일 보기 프로젝트 열기: tillkruss/redis-object-cache 0 사용 예제들

공개 메소드들

메소드 설명
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.