Simplify arithmetic implementation

Change-Id: Iab30b3f722afe93260394ac4cfec0a6354f55eaf
Reviewed-on: http://review.couchbase.org/22846
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-83 - Add persist_to and replicate_to

This replace the observe parameter for the object oriented
variants for add, set, replace, cas, setMulti and delete

Change-Id: Idcba1502371de680c4212065d56cfb7272ca0460
Reviewed-on: http://review.couchbase.org/22712
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Simplify flush logic

Change-Id: I2c550897080370831de640492d60ee2ff5ae0393
Reviewed-on: http://review.couchbase.org/22904
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
move stats to a separate file

Change-Id: I0ec0bfea5ccb161b0a36a66020092ea70008e3f8
Reviewed-on: http://review.couchbase.org/22935
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
refactor: move version to separate file

Change-Id: I677e0f4bbf34250d0aa5bc190389b61d714b0f6a
Reviewed-on: http://review.couchbase.org/22937
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Sort file listing

Change-Id: I17bdc8c0c31b2d90e435fbb06679cfa7c334e681
Reviewed-on: http://review.couchbase.org/22944
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Beef up options code

Change-Id: Iebecddda38eabd0fcefffe0571c78eb225269956
Reviewed-on: http://review.couchbase.org/22945
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix the error message thrown from storing too big item

Change-Id: I47dfffede1a73bdfdc5e7edd319e574a46eb5dc2
Reviewed-on: http://review.couchbase.org/23016
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Fix buildrelated problems

Change-Id: If7b37582a25e31fecb7574839cb5443505789d4c
Reviewed-on: http://review.couchbase.org/23025
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
PCBC-153: move flush function to RESTful flush

Note that this change require the connection to be
provided with credentials (username, password and bucket name)

Change-Id: If8b33e57a9dac7469d654c84f67386d5cbd08e31
Reviewed-on: http://review.couchbase.org/23014
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-52 Add support for unlock

Change-Id: I5f69134f4a26028bc4b5b7a3cff67ff4dc90781c
Reviewed-on: http://review.couchbase.org/23028
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Add information on how to contribute to the driver

Change-Id: Icf1e1233eb6f9df9e3e8238ee6668584f5a86101
Reviewed-on: http://review.couchbase.org/23034
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Fix observe test for max durability spec

Test was using the number of servers as the number of possible persist
nodes, when in fact this figure should only be replicas + 1 (master)

Change-Id: I8f6852a98175bdecf7b527b48ffe40e80559c255
Reviewed-on: http://review.couchbase.org/23076
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Regenerate phpt tests

Change-Id: I3459b4d617774f90ed969e6383bd87a80307a907
Reviewed-on: http://review.couchbase.org/23077
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-160: Buckets may be configured with too many replicas

By default it creates the default bucket with a single replica,
but you need to add a server in order to be able to fulfill
this. The php test suite fails unless you have at least
two nodes in your cluster (unless you configured the cluster
correctly)

Change-Id: I58e69e3b09d6e877ab2dd05d1dfab76cb34e584a
Reviewed-on: http://review.couchbase.org/23080
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Let get and getAndLock be two different commands

Change-Id: Ib719eb6bbdade400043e81a353917aa993d402aa
Reviewed-on: http://review.couchbase.org/23060
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Refactor: move the touch part of get to getAndTouch

Change-Id: Idb8b91c0661574a987875087ba362c9688a3d398
Reviewed-on: http://review.couchbase.org/23081
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
PCBC-159 Fix incorrect timeouts

The code that decoded the information in the observe response
didn't interpret the values correctly. The ttr and ttp fields
are not related to the document itself, but _AVERAGE_ values
for the cluster.

Change-Id: I897e8a651b449a6e5ad15f063cc184a67e4ae438
Reviewed-on: http://review.couchbase.org/23103
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
PCBC-150: make default view timeout 75s

The default connection_timeout on the server is still 60
seconds, but this timer will kill the request if we've not
gotten a reply within 75 secs (normally we'll get a reply
from the server if it times out on that side)

Change-Id: Ice4c6d01127d989f5d0ef243562b25a013029da4
Reviewed-on: http://review.couchbase.org/23118
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Remove compiler warnings

warning: format string is not a string literal
         (potentially insecure) [-Wformat-security]

Change-Id: I68e4f688b9e50729f7533e9d77351e4711f0e557
Reviewed-on: http://review.couchbase.org/23193
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>