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

Nicolas Capponi
21.07.2014 13f31d030c3b205931b63c29b0d6bc1d4eefd163
refs
author Nicolas Capponi <nicolas.capponi@forgerock.com>
Thursday, August 21, 2014 15:07 +0200
committer Nicolas Capponi <nicolas.capponi@forgerock.com>
Thursday, August 21, 2014 15:07 +0200
commit13f31d030c3b205931b63c29b0d6bc1d4eefd163
tree 7c8201d08576528a625fd0d15c61cde932dab3df tree | zip | gz
parent 05d16b8e44ddb39163281ce2eefd5f60d574cc37 view | diff
Checkpoint commit for OPENDJ-1206 : Create a new ReplicationBackend/ChangelogBackend 
to support cn=changelog
CR-4083

Implementation of core features of the changelog backend:
* Initialization and finalization of the backend
* Search of the changelog, in cookie mode (with a cookie control) and
draft compat mode (by change number)

Note that :
* The support for persistent searches is not implemented yet.
* The changelog backend is currently not branched into code, i.e
the directory server still uses the ECL workflow for "cn=changelog",
because it is not possible to enable both changelog backend and ECL
workflow at the same time (waiting for psearches implementation
before branching the new code)

Code changes:
* ChangelogBackend.java:
- implementation of search(), hasSubordinates(), numSubordinates(),
and getEntryCount() methods

* ReplicationServer.java:
- new dependency on ChangelogBackend and ECLEnabledDomainPredicate
- new constructor with ECLEnabledDomainPredicate argument
- new methods enableExternalChangeLog() and shutdownExternalChangelog()
as future replacement of enabledECL() and shutdownECL()
- new method getDomainDNs(Set<DN>) for retrieval of domain DNs but an
excluded set of dns
- new method validateServerState(MultiDomainServerState, Set<DN>) for
checking coherency of given state with the replication server

* ReplicationDomainDB.java:
- new method getCursorFrom(MultiDomainServerState, PositionStrategy, Set<DN>)
that exclude a given set of domain DNs from the cursor obtained

* FileChangelogDB.java, JEChangelogDB.java:
- implementation of new method
getCursorFrom(MultiDomainServerState, PositionStrategy, Set<DN>)

* ECLEnabledDomainPredicate.java, ECLMultiDomainDBCursor.java:
- update visibility to public in order to use these classes in ChangelogBackend

* ChangelogBackedTestCase.java:
- test of ChangelogBackend class, built from ExternalChangeLogTest.java,
with lots of renaming, refactoring, cleaning compared to original class
- majority of tests are disabled until the changelog backend is branched into
code (as these tests require a running server)

* MonitorTest.java:
- update creation of ReplicationServer class to use a custom
ECLEnabledDomainPredicate

* replication.properties:
- add messages for changelog backend
9 files modified
1 files added
2355 ■■■■■ changed files
opendj-sdk/opends/src/messages/messages/replication.properties 4 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/backends/ChangelogBackend.java 1159 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java 152 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java 28 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java 15 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/ECLEnabledDomainPredicate.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/ECLMultiDomainDBCursor.java 2 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 13 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/ChangelogBackendTestCase.java 968 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/MonitorTest.java 12 ●●●●● diff | view | raw | blame | history