DESCRIPTION

Refactor CouchbasePartitionInfo.

Motivation
----------
The PartitionInfo is better suited for an external class for testability and
reusability.

Modifications
-------------
The class has been moved out into a standalone class. Also, the forward partition
map is not exposed anymore, the tainted value is calculated directly.

Result
------
Better testability and a unnecessary List removed.

Change-Id: I7415182cbc2e0f117e9db2edf02834d26a6f75a4


COMMENTS

author: Natasha Sullivan
date: 2015-01-09 15:57:28.046000000

Uploaded patch set 2.

-------------------------------------
author: Estrella Humphrey
date: 2015-01-09 16:08:17.619000000

Patch Set 2: Code-Review-1

(2 comments)

Line:52, src/main/java/com/couchbase/client/core/config/CouchbasePartitionInfo.java -> previous code would also check if forwardPartitions was empty (in which case it would not be considered tainted). shouldn't it initialize to "forwardPartitions != null && ! forwardPartitions.isEmpty()"?

Line:68, src/main/java/com/couchbase/client/core/config/DefaultCouchbaseBucketConfig.java -> now this is equivalent to " ! (forwardPartitions != null)", so "forwardPartitions == null"...
didn't you mean this.tainted = partitionInfo.tainted() ?

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