DESCRIPTION

JVMCBC-385: Implement Generic Service Pool

Motivation
----------
core-io had a longstanding limitation that the number of endpoints,
practically speaking, has always been fixed. While configurable, in
practice this means fiddling around with config settings and as a
result providing a non-optimal user experience. It also makes it
hard to shut off sockets if they are not needed during idle
periods.

A recent change which disables pipeling has further fueled the need
for such a change, since it led to decreased performance out of the
box.

Modifications
-------------
This, honestly quite big, changeset changes the situation. While it
touches many files it boils down to a couple of distinct changes
that ultimately leady to a flexible service pool implementation.

* Supporting changes
 - AbstractGenericHandler now tracks "KeepAlive" messages with a
   marker interface.
 - Endpoints track if they are free and track the last timestamp
   when a message has been completed.
 - The Environment now has a ServiceConfig that is used to configure
   the services instead of a simple "num endpoints"

* Main changes
 - the PoolService implements the pool functionality and the
   PoolServiceTest file has all the relevant tests for it
 - The old pools have not been removed since the config and DCP
   service still use it, a ticket has been filed to remove that
   in subsequent changesets.
 - The selection strategy has been modified to work with a list
   and not an array

Result
------
The SDK now by default has a flexible pool structure for N1QL, Views
and Fulltext.

Change-Id: Ibdeeb975949a8e2262d41c9d70dd369c14170961


COMMENTS

author: Natasha Sullivan
date: 2017-02-02 10:05:52.889000000

Uploaded patch set 13.

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