Riak

Riak

category

Basho

author

Riak team (https://github.com/basho/riak-php-client/contributors)

Methods

Construct a new Client object.

__construct(string $host = '127.0.0.1', int $port = 8098, string $prefix = 'riak', string $mapred_prefix = 'mapred') 

Arguments

$host

string

  • Hostname or IP address (default '127.0.0.1')

$port

int

  • Port number (default 8098)

$prefix

string

  • Interface prefix (default "riak")

$mapred_prefix

string

  • MapReduce prefix (default "mapred")

Get the R-value setting for this Client

getR() : integer

Default: 2

Response

integer

Set the R-value for this Client

setR(integer $r) : $this

This value will be used for any calls to get(...) or getBinary(...) where 1) no R-value is specified in the method call and 2) no R-value has been set in the Bucket.

Arguments

$r

integer

  • The R value.

Response

$this

Get the W-value setting for this Client

getW() : integer

Default: 2

Response

integer

Set the W-value for this Client

setW(integer $w) : $this

See setR(...) for a description of how these values are used.

Arguments

$w

integer

  • The W value.

Response

$this

Get the DW-value for this ClientOBject

getDW() : integer

Default: 2

Response

integer

Set the DW-value for this Client

setDW(integer $dw) : $this

See setR(...) for a description of how these values are used.

Arguments

$dw

integer

  • The DW value.

Response

$this

Get the clientID for this Client.

getClientID() : string

Response

string

Set the clientID for this Client

setClientID($clientid) : $this

Should not be called unless you know what you are doing.

Arguments

$clientid

Response

$this

Get the bucket by the specified name

bucket($name) : \Basho\Riak\Bucket

Since buckets always exist, this will always return a Bucket.

Arguments

$name

Response

\Basho\Riak\Bucket

Get all buckets

buckets() : \Basho\Riak\array()

Response

\Basho\Riak\array()

of Bucket objects

Check if the Riak server for this Client is alive

isAlive() : boolean

Response

boolean

Start assembling a Map/Reduce operation

add($params) : \Basho\Riak\MapReduce
see

Arguments

$params

Response

\Basho\Riak\MapReduce

Start assembling a Map/Reduce operation.

map($params) 
see

Arguments

$params

Start assembling a Map/Reduce operation.

reduce($params) 
see

Arguments

$params