Fix issues with LeastLoadedCandidateSelectionStrategy
LLCSS degenerates into a round robin owner allocator when
ownership changes. This patch fixes that issue as follows,
- Consider the statistics that are collected using the DTL
only as initialStatistics which are passed to the Strategy
when it is created
- When Leadership changes clear all the strategies so that
they get freshly created with the right initial statistic
- Modify the newOwner method on Strategy to
- pass the currentOwner for the entity, for the current
owner we decrease the ownership statistic
- remove the statistics passed to it as it would no longer
be required. Due to this removal we also get rid of all
the CRUD which we had added to check if the passed in
stats were actually greater than the local stats which
anyway did not work.
Change-Id: I754f0459051687a95056857044777ca6eebbcd93
Signed-off-by: Moiz Raja <moraja@cisco.com>