Documentation

PredisCluster
in package
implements ClusterInterface, IteratorAggregate, Countable

Abstraction for a cluster of aggregate connections to various Redis servers implementing client-side sharding based on pluggable distribution strategies.

Tags
author

Daniele Alessandri suppakilla@gmail.com

todo

Add the ability to remove connections from pool.

Interfaces, Classes and Traits

ClusterInterface
Defines a cluster of Redis servers formed by aggregating multiple connection instances to single Redis nodes.
IteratorAggregate
Countable

Table of Contents

$distributor  : mixed
$pool  : mixed
$strategy  : mixed
__construct()  : mixed
add()  : mixed
{@inheritdoc}
connect()  : mixed
{@inheritdoc}
count()  : int
disconnect()  : mixed
{@inheritdoc}
executeCommand()  : mixed
{@inheritdoc}
executeCommandOnNodes()  : array<string|int, mixed>
Executes the specified Redis command on all the nodes of a cluster.
getClusterStrategy()  : StrategyInterface
Returns the underlying command hash strategy used to hash commands by using keys found in their arguments.
getConnection()  : mixed
{@inheritdoc}
getConnectionById()  : mixed
{@inheritdoc}
getConnectionByKey()  : NodeConnectionInterface
Retrieves a connection instance from the cluster using a key.
getIterator()  : Traversable<string|int, NodeConnectionInterface>
isConnected()  : mixed
{@inheritdoc}
readResponse()  : mixed
{@inheritdoc}
remove()  : mixed
{@inheritdoc}
removeById()  : bool
Removes a connection instance using its alias or index.
writeRequest()  : mixed
{@inheritdoc}

Properties

Methods

connect()

{@inheritdoc}

public connect() : mixed
Return values
mixed

disconnect()

{@inheritdoc}

public disconnect() : mixed
Return values
mixed

executeCommandOnNodes()

Executes the specified Redis command on all the nodes of a cluster.

public executeCommandOnNodes(CommandInterface $command) : array<string|int, mixed>
Parameters
$command : CommandInterface

A Redis command.

Return values
array<string|int, mixed>

getConnectionById()

{@inheritdoc}

public getConnectionById(mixed $connectionID) : mixed
Parameters
$connectionID : mixed
Return values
mixed

isConnected()

{@inheritdoc}

public isConnected() : mixed
Return values
mixed

removeById()

Removes a connection instance using its alias or index.

public removeById(string $connectionID) : bool
Parameters
$connectionID : string

Alias or index of a connection.

Return values
bool

Returns true if the connection was in the pool.

Search results