OPENDJ-1441 (CR-4037) Persistent searches on external changelog do not return changes for new replicas and new domains
Fixed a problem introduced in r10912.
Problem was due to removing domains from the MultiDomainDBCursor:
In CompositeDBCursor.removeNoLongerNeededCursors(), code iterates over cursors and then forget baseDNs to remove only they match with a cursor.
Problem is that it should be the other way around: iterate over the baseDNs to remove and always forget them whether or not a matching cursor is found.
ChangeNumberIndexer.java:
In run(), better handled the removed domains.
CompositeDBCursor.java:
In removeNoLongerNeededCursors(), iterate over the baseDNs to remove, find a cursor and remove it if found, then always forget the baseDN.
Added abstract method removedCursorsIterator().
Removed isCursorNoLongerNeededFor() and cursorRemoved().
DomainDBCursor.java, MultiDomainDBCursor.java, CompositeDBCursorTest.java:
Consequence of the changes to CompositeDBCursor.
ExternalChangeLogTest.java:
Code cleanup.
Extracted method readMessages() to factorize code.
Added method assertLastCookieDifferentThanLastValue() to loop until last cookie is updated.
Added inner class Results.
FileChangelogDB.java, JEChangelogDB.java:
In getExistingOrNewDomainMap(), only add the new domain if the baseDN is from an ECL enabled domain.
FileReplicaDBCursor.java:
Fixed javadoc.