PHP 클래스 Predis\Cluster\SlotMap

상속: implements ArrayAccess, implements IteratorAggregate, implements Countable
파일 보기 프로젝트 열기: nrk/predis 1 사용 예제들

공개 메소드들

메소드 설명
count ( ) : integer Returns the current number of assigned slots.
getIterator ( ) : ArrayIterator Returns an iterator over the slot map.
getNodes ( ) : array Returns the list of unique nodes in the slot map.
getSlots ( integer $first, integer $last ) : array Returns the specified slot range.
isEmpty ( ) : boolean Checks if the slot map is empty.
isValid ( $slot ) : boolean Checks if the given slot is valid.
isValidRange ( integer $first, integer $last ) : boolean Checks if the given slot range is valid.
offsetExists ( integer $slot ) : boolean Checks if the specified slot is assigned.
offsetGet ( integer $slot ) : string Returns the node assigned to the specified slot.
offsetSet ( integer $slot, NodeConnectionInterface | string $connection ) : string Assigns the specified slot to a node.
offsetUnset ( integer $slot ) : string Returns the node assigned to the specified slot.
reset ( ) Resets the slot map.
setSlots ( integer $first, integer $last, NodeConnectionInterface | string $connection ) Assigns the specified slot range to a node.
toArray ( ) : array Returns the current slot map as a dictionary of $slot => $node.

메소드 상세

count() 공개 메소드

Returns the current number of assigned slots.
public count ( ) : integer
리턴 integer

getIterator() 공개 메소드

Returns an iterator over the slot map.

getNodes() 공개 메소드

Returns the list of unique nodes in the slot map.
public getNodes ( ) : array
리턴 array

getSlots() 공개 메소드

Returns the specified slot range.
public getSlots ( integer $first, integer $last ) : array
$first integer Initial slot of the range.
$last integer Last slot of the range.
리턴 array

isEmpty() 공개 메소드

Checks if the slot map is empty.
public isEmpty ( ) : boolean
리턴 boolean

isValid() 공개 정적인 메소드

Checks if the given slot is valid.
public static isValid ( $slot ) : boolean
리턴 boolean

isValidRange() 공개 정적인 메소드

Checks if the given slot range is valid.
public static isValidRange ( integer $first, integer $last ) : boolean
$first integer Initial slot of the range.
$last integer Last slot of the range.
리턴 boolean

offsetExists() 공개 메소드

Checks if the specified slot is assigned.
public offsetExists ( integer $slot ) : boolean
$slot integer Slot index.
리턴 boolean

offsetGet() 공개 메소드

Returns the node assigned to the specified slot.
public offsetGet ( integer $slot ) : string
$slot integer Slot index.
리턴 string

offsetSet() 공개 메소드

Assigns the specified slot to a node.
public offsetSet ( integer $slot, NodeConnectionInterface | string $connection ) : string
$slot integer Slot index.
$connection NodeConnectionInterface | string ID or connection instance.
리턴 string

offsetUnset() 공개 메소드

Returns the node assigned to the specified slot.
public offsetUnset ( integer $slot ) : string
$slot integer Slot index.
리턴 string

reset() 공개 메소드

Resets the slot map.
public reset ( )

setSlots() 공개 메소드

Assigns the specified slot range to a node.
public setSlots ( integer $first, integer $last, NodeConnectionInterface | string $connection )
$first integer Initial slot of the range.
$last integer Last slot of the range.
$connection NodeConnectionInterface | string ID or connection instance.

toArray() 공개 메소드

The order of the slots in the dictionary is not guaranteed.
public toArray ( ) : array
리턴 array