Public Member Functions

RiakClient Class Reference

Public Member Functions

 RiakClient ($host='127.0.0.1', $port=8098, $prefix='riak', $mapred_prefix='mapred')
 getR ()
 setR ($r)
 getW ()
 setW ($w)
 getDW ()
 setDW ($dw)
 getClientID ()
 setClientID ($clientid)
 bucket ($name)
 isAlive ()
 add ($params)
 search ($params)
 link ($params)
 map ($params)
 reduce ($params)

Member Function Documentation

add ( params )

Start assembling a Map/Reduce operation.

See also:
RiakMapReduce::add()
Returns:
RiakMapReduce
bucket ( name )

Get the bucket by the specified name. Since buckets always exist, this will always return a RiakBucket.

Returns:
RiakBucket
getClientID (  )

Get the clientID for this RiakClient.

Returns:
string
getDW (  )

Get the DW-value for this ClientOBject. (default 2)

Returns:
integer
getR (  )

Get the R-value setting for this RiakClient. (default 2)

Returns:
integer
getW (  )

Get the W-value setting for this RiakClient. (default 2)

Returns:
integer
isAlive (  )

Check if the Riak server for this RiakClient is alive.

Returns:
boolean
link ( params )

Start assembling a Map/Reduce operation.

See also:
RiakMapReduce::link()
map ( params )

Start assembling a Map/Reduce operation.

See also:
RiakMapReduce::map()
reduce ( params )

Start assembling a Map/Reduce operation.

See also:
RiakMapReduce::reduce()
RiakClient ( host = '127.0.0.1',
port = 8098,
prefix = 'riak',
mapred_prefix = 'mapred' 
)

Construct a new RiakClient object.

Parameters:
string$host- Hostname or IP address (default '127.0.0.1')
int$port- Port number (default 8098)
string$prefix- Interface prefix (default "riak")
string$mapred_prefix- MapReduce prefix (default "mapred")
search ( params )

Start assembling a Map/Reduce operation. This command will return an error unless executed against a Riak Search cluster.

See also:
RiakMapReduce::search()
Returns:
RiakMapReduce
setClientID ( clientid )

Set the clientID for this RiakClient. Should not be called unless you know what you are doing.

Parameters:
string$clientID- The new clientID.
Returns:
$this
setDW ( dw )

Set the DW-value for this RiakClient. See setR(...) for a description of how these values are used.

Parameters:
integer$dw- The DW value.
Returns:
$this
setR ( r )

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

Parameters:
integer$r- The R value.
Returns:
$this
setW ( w )

Set the W-value for this RiakClient. See setR(...) for a description of how these values are used.

Parameters:
integer$w- The W value.
Returns:
$this

The documentation for this class was generated from the following file: