Use the correct default Hashing Algorithm - JCBC-29

Change-Id: Ifb1a9ebcc7ae64a8590f1123ddde9138c17fe23e
Reviewed-on: http://review.couchbase.org/14485
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reconnect to configuration stream if disconnected. JCBC-19

With this change, a Bucket which is marked as disconnected will be
later reconnected when noticed by a calling thread.

The logic for this is a little convoluted at the moment, but tests
to be correct.  In the future, this whole section should be refactored
to be a better NodeLocator or something similar.  See JCBC-28.

Change-Id: I8541493fdf7e8c504c4cbd512ca43e3416b03829
Reviewed-on: http://review.couchbase.org/14574
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Change back to spymemcached 2.8.0 for this branch.

Change-Id: I38ef9d66544f30f8101ca04889b8042c1abfc177
Reviewed-on: http://review.couchbase.org/14586
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Missing space added to log message when node is down.

Change-Id: Ifad8da0b4e42f4f58945510de8513e6a7f1424e2
Reviewed-on: http://review.couchbase.org/15462
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Added additional ctor to avoid username. JCBC-38.

Change-Id: If487df95e2974f0a4c60e3c57978a82596967de6
Reviewed-on: http://review.couchbase.org/15435
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Update dependencies to spymemcached 2.8.1. JCBC-39.

Change-Id: I9d4e1099edbe4d32d80af22b19cfd3dad6bde221
Reviewed-on: http://review.couchbase.org/15436
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Do not override fetching of AuthDescriptor.  JCBC-59

Change-Id: Iff02589db6e1a3c3f56108a647e37b821b6cc447
Reviewed-on: http://review.couchbase.org/16765
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Fix checkstyle errors

Change-Id: I87007bd428da34badc0d5a10ef17aa50b8132804
Reviewed-on: http://review.couchbase.org/18655
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>
Update deps to spy 2.8.2-SNAPSHOT

This will be replaced before release with the non-snapshot.

Change-Id: Ia9800f9f63279c4716963066dc059e88aa009119
Reviewed-on: http://review.couchbase.org/18755
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Use the correct Connection type for the config.  JCBC-53

In the refactoring of the client into two packages, we lost
the functionality that would handle reconfiguration from
MemcachedConnections.  This change introduces a
CouchbaseMemcachedConnection which extends the MemcachedConnection
and implements reconfiguration.  By doing so, we properly handle
add and remove node events from the cluster.

Change-Id: Ief068cab934542617a11e2f527d98b9c38affd07
Reviewed-on: http://review.couchbase.org/16337
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Ensure config update checks do not overwhelm the system.  JCBC-54.

Change-Id: Id0514278608fa1476e21c0f52958860404240561
Reviewed-on: http://review.couchbase.org/16338
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Honor TestConfig in syncGetTimeoutsInitClient().

Change-Id: I6b1d9cba8598799177f686016970ca254e9cec9e
Reviewed-on: http://review.couchbase.org/18758
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Tested-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Workaround NOT_MY_VBUCKET during optimization, and test.

On SPY-91, it was found that receiving a NOT_MY_VBUCKET
response in the middle of an optimized batch of requests
will upset things by causing the optimized operation itself
to be unqueued for reads, rather than retrying the contained
operation.

Since the severity level is high and the workaround is
straightforward (disable optimization) this commit both
disables optimization and introduces the test which helped
find the cause of the issue.

Recommended way of verifying this would be to remove the
two sections related to disabling optimization and then
verify the test fails.

Change-Id: I20aa2945bbbbe9f19a56a41224244fe368d5e34e
Reviewed-on: http://review.couchbase.org/18757
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
JCBC-88: Fix resubscr by not waiting long and asynch subscribing.

It was found during autofailover testing that the client
did not recover well.  The problem was that we completed the
resubscription on one of the callers threads.  The subscription
can take upward of 700ms, but if the caller adjusts their timeout
for operations to be lower, we don't complete the resubscription.

This change does a couple of things:
1) doesn't allow the connection for any individual HTTP request
   (non-streaming) to take longer than 500ms to establish for
   purposes of faster failover
2) changes resubscription to occur in a thread temporarily
   spawned by the CouchbaseConnectionFactory, so it can complete
   even if the caller's request times out.

This has been tested to show autofailover working correctly.

Change-Id: I87582b99fa872530a62a336b3144fefc60b63f6e
Reviewed-on: http://review.couchbase.org/19008
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
Add a few minor override annotations.

Change-Id: I943c6253c55fa96f6a567dacd2598192f512f21b
Reviewed-on: http://review.couchbase.org/19012
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Add default test type to ant build.

Change-Id: Ib0cc409a440ff5b485d6a188f77867abc79bc204
Reviewed-on: http://review.couchbase.org/19017
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Added a simple README.

Change-Id: I71ee47b5f3c3260657ec70644f63d9a58eb73055
Reviewed-on: http://review.couchbase.org/19018
Tested-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Update spymemcached depedency to 2.8.2 release.

Change-Id: I2f3099dc885de9e78ca67607174408ad5b075d0e
Reviewed-on: http://review.couchbase.org/19051
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Jasdeep Jaitla <jasdeep@couchbase.com>
Merge branch 'release10'

By Matt Ingenthron (16) and others

* gerrit/release10:
  Added a simple README.
  Add default test type to ant build.
  Add a few minor override annotations.
  JCBC-88: Fix resubscr by not waiting long and asynch subscribing.
  Workaround NOT_MY_VBUCKET during optimization, and test.
  Honor TestConfig in syncGetTimeoutsInitClient().
  Ensure config update checks do not overwhelm the system.  JCBC-54.
  Use the correct Connection type for the config.  JCBC-53
  Update deps to spy 2.8.2-SNAPSHOT
  Fix checkstyle errors
  Do not override fetching of AuthDescriptor.  JCBC-59
  Added additional ctor to avoid username. JCBC-38.
  Missing space added to log message when node is down.
  Reconnect to configuration stream if disconnected. JCBC-19
  Use the correct default Hashing Algorithm - JCBC-29

Conflicts:
	ivy/libraries.properties
	src/main/java/com/couchbase/client/CouchbaseClient.java
	src/main/java/com/couchbase/client/CouchbaseConnection.java
	src/main/java/com/couchbase/client/CouchbaseConnectionFactory.java

Change-Id: Idefa785503f0dae99624af7172ba38f54087a45e