JCBC-314: Bring README file up to date

Change-Id: Iec1a77e1cb9e5e3533da5db3df93e3620b66ef05
Reviewed-on: http://review.couchbase.org/26774
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-250: Fail Fast when Observe with Memcached Bucket is used.

This changeset makes sure that an obviously illegal operation
(using persist/repliace with memcached type buckets) fails
fast and with a expressive IllegalArgumentException and not
further down the stack with a ClassCastException as reported
in the JCBC ticket.

Change-Id: Icb6acc019df737a7f2b10bc83f9a303594fd8369
Reviewed-on: http://review.couchbase.org/26541
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Upgrade SPY to 2.9.0 (served from maven central).

Change-Id: I281e60a8dff9b6a5d8d7504a7f07fe1904efd8eb
Reviewed-on: http://review.couchbase.org/26778
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
JCBC-161: Remove duplication for observe checks

This changeset removes duplication in terms of observe node
size checks. A less accurate one has been removed in favor
of the - already in place - more accurate one.

Since the exception names have changed, the tests have been
adapted to reflect the new names. assumeTrue() fixes have
been added to make sure they don't produce false positives
in test scenarios which equal or more to 4 nodes.

Change-Id: Ie8b3b129b2b8781d916b54bc06f31f20408e7dad
Reviewed-on: http://review.couchbase.org/26261
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-312: When vbucket master is -1, trigger reconfigure.

This changeset makes sure that when no active master is found,
reconfiguration is properly triggered.

Change-Id: I5f4f2b9aac9db1b536cba596e8ed062453b7a263
Reviewed-on: http://review.couchbase.org/26636
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
JCBC-313: Retry View Request if Response Code >= 300

This changeset makes sure that responses on view requests
that are either redirects or 500 on the server get retried,
because we consider them non-fatal. Note that HTTP 400 are
considered client side errors and are not retried.

Also, already cancelled or timed out ops are not retried.

Change-Id: I0d93e3d5c95dd6565d0b726a0bfd2cf31bef2ad9
Reviewed-on: http://review.couchbase.org/26639
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-320: Catch ConcurrentModificationException also for Memcache
Buckets.

Change-Id: I86f1feaca2dfbdd5a80d6dfb46636dbd03045a01
Reviewed-on: http://review.couchbase.org/27066
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Removing unused generic type from DesignDocument.

Change-Id: I7c13306854a3c986f5b52faabf3b2c792e983c35
Reviewed-on: http://review.couchbase.org/27077
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Adapting testStatsKey Testcase to account changes in 2.1.0.

This changeset makes sure that the test case passes for both
post 2.1.0 and pre 2.1.0, because the exposed key stats
have changed between versions.

Change-Id: Ia32dd34c5cb5b504471f4660f152e7f4799b8f66
Reviewed-on: http://review.couchbase.org/27215
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-76: Replica Read Command

This changeset implements the replica read command
on both the application level facing CouchbaseClient
and also implements the backend changes neeeded.

It depends on the corresponding changes on the SPY
project (see SPY-113).

Change-Id: Idfd0836adfd5212152f369e8e624d45c4c9ca2b4
Reviewed-on: http://review.couchbase.org/24750
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-323: Make flush() shutdown-aware.

This changeset makes sure that when flush() is called, it properly
checks that we are up and running and not shutDown.

It also exposes the shutDown variable to all other package-private
members.

Change-Id: Id8fcd379c260ef6586d4a73b97dbf540b33a1372
Reviewed-on: http://review.couchbase.org/27216
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-318: Making sure reconnect logic is not called in parallel.

This also prevents the underlying logic to be executed more often
than needed and therefore mitigating race conditions and overloaded
IO.

Change-Id: I6c18feadf55c56bb5bc0ba5c8e6920337e452f21
Reviewed-on: http://review.couchbase.org/26860
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-319: check config for memcache buckets.

This changeset makes sure that when using ketama with
memcache buckets, failing operations also trigger
reconfiguration eventually. Note that this algorithm is
different than for the CouchbaseConnection, because ketama will
always find a next node. Therefore, we trigger reconfigure but let
the doc pass through to a separate node.

Change-Id: I83ce342b76358a374469ca27e3807d8c3d8381af
Reviewed-on: http://review.couchbase.org/27065
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-322 : Extended test coverage for the store, retrieve operations

This changeset adds more test coverage for the add, replace
and set operations which are currently not covered by the
underlying SPY tests.

Change-Id: Ie2ad5bd48dbea7ab09a76e3d4010355af5398231
Reviewed-on: http://review.couchbase.org/27167
Reviewed-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
JCBC-266: Harden HTTP Provider on empty pool buckets.

This changeset makes sure a proper exception is thrown when
no valid bucket configuration could be found. The resubscriber
picks it up and retries again.

Change-Id: I254c5498a149fc2bab2f5459b10c0654354d23fe
Reviewed-on: http://review.couchbase.org/26862
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Fix MemcachedMock to align with latest SPY changes.

Change-Id: I113802e89d1f74f93859e7298f06a693ea402d6b
Reviewed-on: http://review.couchbase.org/27261
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Upgrade to SPY 2.9.1

Change-Id: I615ec7a305c2177810e4307f41cd21a68d083a9a
Reviewed-on: http://review.couchbase.org/27214
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Fix BucketMonitorTest and harden request code to avoid HTTP 401.

This changeset fixes the test cases to correctly pass in the
username. The server code has changed with 2.1 so that an
authorized header with empty user/password on the default
bucket are no longer ignored, therefore leading to
unauthorized responses in tests.

This does not affect production, because the code normally
passes in the bucket name as the user, which gets recognized
properly. A small change also now exposes this unlikely
situation with an exception, so that it just "doesnt stop"
silently in this case.

Change-Id: I46793cdc42e4851d72a81338e5ee5c47b3f86608
Reviewed-on: http://review.couchbase.org/27283
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
JCBC-327: Adding missing CouchbaseClientIF Signatures.

Change-Id: I505b95d1dbc76a365572ded83c85c5e6581ffe3e
Reviewed-on: http://review.couchbase.org/27307
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Checkstyle fixes before 1.1.8 release round.

Change-Id: I675fda5d0d0de3155d1ddddc68e204b81f468142
Reviewed-on: http://review.couchbase.org/27309
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Deepti Dawar <deepti.dawar@globallogic.com>