Class Riak
This class maintains the list of nodes in the Riak cluster.
$nodes = (new Node\Builder) ->atHost('localhost') ->onPort(8098) ->build() $riak = new Riak($nodes); $command = (new Command\Builder\FetchObject($riak)) ->buildLocation('username', 'users') ->build(); $response = $command->execute($command); $user = $response->getObject();
Methods summary
public
|
#
__construct( array $nodes, array $config = [],
Construct a new Client object, defaults to port 8098. |
protected
integer
|
|
public
|
|
public
mixed
|
|
public
array
|
|
public
|
|
public
|
|
public
integer
|
|
public
|
|
public
|
|
public
string
|
|
public
|
Properties summary
protected
|
$nodes
Riak server ring |
#
[]
|
protected
array
|
$config
Configuration options for this client |
#
[
'prefix' => 'riak',
'mapred_prefix' => 'mapred',
'index_prefix' => 'buckets',
'dns_server' => '8.8.8.8',
'max_connect_attempts' => 3,
]
|
protected
integer
|
$activeNodeIndex
The actively connected Riak Node from the ring |
#
0
|
protected
|
$api
API Bridge class to use |
#
NULL
|
protected
array
|
$inactiveNodes
List of nodes marked inactive |
#
[]
|
protected
integer
|
$attempts
Connection attempts made that failed |
#
0
|