mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
07.52.2014 a70ba64bad6682020c31e3d315276fac0f25d61d
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, October 7, 2014 14:52 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, October 7, 2014 14:52 +0200
commita70ba64bad6682020c31e3d315276fac0f25d61d
tree 6997aee201e829a4dc38fb49f32d3a2c7f9e8441 tree | zip | gz
parent 7d5626f01a5ff72a8b9bbd803f6a3f4a0926a5da view | diff
(CR-4742) Move data from SearchParams to EntrySenders.

* because SearchParams aggregate data for both changeNumber based and cookie based searches (mix of concerns)
* it seems to me it would be more appropriate to use both EntrySender to store this information, for example it is storing the cookie too
* however I agree this blurs the role of EntrySender a bit, but not that much
* because storing these info in entrySender would more efficiently allow to avoid passing parameters in methods.




ChangelogBackend.java:
Moved SearchParams fields to the relavant entry senders: CookeEntrySender and ChangeNumberEntrySender. Only left highestChangeNumber and lowestChangeNumber for optimizations. Totally removed csn which was not used.
Renamed SearchParams to ChangeNumberRange.
Inlined initialSearch().
Inlined validatePersistentSearch() into initializePersistentSearch().
In initialSearchFromChangeNumber(), fixed a bug where we should stop after sending the base changelog entry if only based is asked.

ChangelogBackendTestCase.java:
Consequence of the changes to ChangelogBackend
2 files modified
395 ■■■■■ changed files
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/backends/ChangelogBackend.java 367 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/backends/ChangelogBackendTestCase.java 28 ●●●●● diff | view | raw | blame | history