OPENDJ-1541 (CR-4516) Persistent search on cn=changelog can return duplicates

Persistent searches are registered before initial search ends (which is correct).
Because a new change can be added to the changelog before the "initial search" phase is over, the "persistent search" phase can return this change before the "initial search" phase returns it later.

To avoid this problem, persistent searches is marked with an enum to mention which phase is being run. The phases are the following:
1. INITIAL: The "initial search" phase is running, the "persistent search" phase do not return any entry.
2. TRANSITIONING: The "initial search" phase has completed and blocks currently running "persistent search" phase while the former is verifying no new updates where persisted to the DB
3. PERSISTENT: The "initial search" phase is finished and completed the transition to the "persistent search" phase. The "persistent search" phase can return all entries.
For the change-number-based persistent searches, only the last changeNumber sent by the "initial search" phase is recorded. For cookie-based persistent searches, for each replica, the last CSN sent by the "initial search" phase is recorded.

Problem is that the transitioning phase has the potential to block the whole server if the client of the persistent search does not consume changes fast enough.
This will be addressed separately.


ChangelogBackend.java:
Added constants COOKIE_ATTACHMENT and ENTRY_SENDER_ATTACHMENT.
Added cookieBasedPersistentSearches and changeNumberBasedPersistentSearches fields.
Added SearchPhase enum.
Added CookieEntrySender, ChangeNumberEntrySender and SendEntryData static inner classes + made several methods static to call them from these classes.
In initialSearchFromCookie(), initialSearchFromChangeNumber(), notifyEntryAdded() and registerPersistentSearch(), set or retrieved attachments + used entrySender.
Extracted methods sendCookieEntriesFromCursor(), sendChangeNumberEntriesFromCursors().
Added initializeAttachements().
Split notifyEntryAdded() in two: notifyCookieEntryAdded() and notifyChangeNumberEntryAdded().

git-svn-id: https://svn.forgerock.org/opendj/trunk@10999 41b1ffd8-f28e-4786-ab96-9950f0a78031
OPENDJ-1541 (CR-4516) Persistent search on cn=changelog can return duplicates

Persistent searches are registered before initial search ends (which is correct).
Because a new change can be added to the changelog before the "initial search" phase is over, the "persistent search" phase can return this change before the "initial search" phase returns it later.

To avoid this problem, persistent searches is marked with an enum to mention which phase is being run. The phases are the following:
1. INITIAL: The "initial search" phase is running, the "persistent search" phase do not return any entry.
2. TRANSITIONING: The "initial search" phase has completed and blocks currently running "persistent search" phase while the former is verifying no new updates where persisted to the DB
3. PERSISTENT: The "initial search" phase is finished and completed the transition to the "persistent search" phase. The "persistent search" phase can return all entries.
For the change-number-based persistent searches, only the last changeNumber sent by the "initial search" phase is recorded. For cookie-based persistent searches, for each replica, the last CSN sent by the "initial search" phase is recorded.

Problem is that the transitioning phase has the potential to block the whole server if the client of the persistent search does not consume changes fast enough.
This will be addressed separately.


ChangelogBackend.java:
Added constants COOKIE_ATTACHMENT and ENTRY_SENDER_ATTACHMENT.
Added cookieBasedPersistentSearches and changeNumberBasedPersistentSearches fields.
Added SearchPhase enum.
Added CookieEntrySender, ChangeNumberEntrySender and SendEntryData static inner classes + made several methods static to call them from these classes.
In initialSearchFromCookie(), initialSearchFromChangeNumber(), notifyEntryAdded() and registerPersistentSearch(), set or retrieved attachments + used entrySender.
Extracted methods sendCookieEntriesFromCursor(), sendChangeNumberEntriesFromCursors().
Added initializeAttachements().
Split notifyEntryAdded() in two: notifyCookieEntryAdded() and notifyChangeNumberEntryAdded().

git-svn-id: https://svn.forgerock.org/opendj/trunk@11000 41b1ffd8-f28e-4786-ab96-9950f0a78031
OPENDJ-1285 CR-4409 Migrate SDK from Futures to Promises

Connection, ConnectionFactory, ResultHandler and SearchResultHandler public APIs have been changed.
* Connection.java
  In all xxxAsync method, the final handler parameter will be removed and the client is expected to register the handler with the returned promise. For search request, a SearchResultHandler is still required because it needs to handle search result entries/references.

* ConnectionFactory.java
  In the method getConnectionAsync(), the final handler parameter will be removed.

* ResultHandler.java
  Now extends SuccessHandler and FailureHandler in order to allow usage of then() method call.

* SearchResultHandler.java
  Remove the inheritance link with ResultHandler. So client needs to register a ResultHandler instance when he calls searchAsync in addition to register a SearchResultHandler.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11001 41b1ffd8-f28e-4786-ab96-9950f0a78031
OpenDJ server trunk should not depend on OpenDJ SDK 3.0.0-SNAPSHOT.
Switched version back to 2.6.10-SNAPSHOT.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11002 41b1ffd8-f28e-4786-ab96-9950f0a78031
Fix OPENDJ-1554. Update default config.ldif used at installation time to match the defaults used when creating new backends.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11003 41b1ffd8-f28e-4786-ab96-9950f0a78031