DESCRIPTION

JCBC-938: Multi values in array mutations

(this is still an in-design part of RFC-002, subdoc API)

Motivation:
-----------
RFC-002 introduces the possibility to insert multiple values at once in
an existing array. This is the implementation of this part of the RFC.

Modifications:
--------------
A new internal type, MultiValue, is introduced to facilitate the special
encoding needed for multi-valued array mutations.

FragmentTranscoder now has two abstract methods: one is the classic
encoding path, the other is the MultiValue encoding path.

3 new specs have been added to the subdoc builders: arrayPrependAll,
arrayAppendAll and arrayInsertAll. Each of these takes a Collection of
values. A convenience alternative signature using varargs is also
offered for each (but doesn't offer the createParents parameter).

The different naming (xxxAll suffix) allows to disambiguate some edge
cases relative to varargs for the compiler. It is also close to the java
collections idiom.

Results:
--------
Multi-valued inserts are now possible in the Java subdoc API, using
either a Collection or a vararg enumeration. Tests have been adapted.

Change-Id: I2d3ab0abba64493c12a1d09bb5033155c21d9345


COMMENTS

author: Estrella Humphrey
date: 2016-03-30 09:04:31.424000000

Uploaded patch set 3.

-------------------------------------
author: Estrella Humphrey
date: 2016-03-30 09:04:56.365000000

Patch Set 3: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2016-03-30 10:06:50.152000000

Patch Set 3:

quick JMH benchmark shows the improvement of iteration #3 over the previous one:
testWithJacksonIndividualStrings  thrpt  200  1258445.634 ± 12324.581  ops/s
testWithOutputStream                   thrpt  200  1661052.408 ± 17342.838  ops/s

-------------------------------------
author: Natasha Sullivan
date: 2016-03-30 10:35:53.968000000

Patch Set 3: Code-Review+2

-------------------------------------
author: Wyatt Kramer
date: 2016-03-30 17:38:11.355000000

Patch Set 3: Code-Review+1

lgtm. +1 based on test and encoding.

-------------------------------------
author: Tate Garrett
date: 2016-03-31 07:36:48.688000000

Change has been successfully cherry-picked as 8d6d43ca25237684491eb3842114d3ea8a3f23cc

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