DESCRIPTION

SPY-184: Support Libmemcached ketama weighted

- Add support for alternative Ketama Node key format

  Libmemcached uses the format for `[hostname or ip][port unless
  default]-[repetition]` while spymemcached has been using
  `[hostname]/[ip]:[port]-[repetition]` the added `KetamaNodeKeyFormat`
  allows to choose either format while retaining the caching
  optimization.

- Add support for weighted ketama
  Straight port of the weighting based on Libmemcached, configured via
  passing a map of node socketaddress to weight to the configuration.
  This code is only active if the weight is actually configured
  otherwise the old ketama code is used.

Change-Id: I0263b9afc513f9a135d5d17318b3fe6bd4593437

COMMENTS

author: Amelie Brooks
date: 2015-03-11 10:57:46.854000000

Patch Set 5: Commit message was updated

-------------------------------------
author: Natasha Sullivan
date: 2015-05-12 21:15:22.624000000

Patch Set 5:

(2 comments)

Line:227, src/main/java/net/spy/memcached/KetamaNodeLocator.java -> as disucssed it makes sense to move the totalWeight into a local field only since its not on the hot code path

Line:242, src/main/java/net/spy/memcached/KetamaNodeLocator.java -> since weighted and unweighted now use the same block code here this can be moved into a helper method

-------------------------------------
author: Tate Garrett
date: 2015-05-19 05:46:14.025000000

Change has been successfully cherry-picked as ce08f5069e3d5c90ea99f682bbd3517250d57ca4

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