DESCRIPTION

JVMCBC-299: Avoid Node[] allocations on the send path.

Motivation
----------
The Locators pick the right Nodes and return them as a Node[] which
in return gets iterated again and the requests send to each node.

Modifications
-------------
This changeset moves the responsibility of sending into the locators,
which has two benefits:

 - No Node[] allocations since nothing needs to be signalled back.
 - The code doesn't need to iterate through the list again, which is 99%
   of the time exactly 1 element.

Since the code itself is not complex, there is not a performance increase
visible but it cleans up the code a bit and more imporantly saves allocations
on every request.

As a side effect, the test case assertions look much nicer now, since we
can explicitly check which node is called on send().

In a 5 minute run with JMH with 10k ops/s, this saved around 100MB of
allocs.

Result
------
Less allocations on the hot code path.

Change-Id: I12e2bacda95b494abb01b8f3533638eb49974f46
Reviewed-on: http://review.couchbase.org/60836
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2016-03-03 11:24:01.878000000

Change has been successfully cherry-picked as 72b6a7b091fbc76caaac5f869fe9cd7e5f8785f2

-------------------------------------
