| | |
| | | boolean isEligible = (newMsg.getChangeNumber().getTime() |
| | | <= eligibleCN.getTime()); |
| | | |
| | | if (debugEnabled()) |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo(" In ECLServerHandler, for " + mh.getServiceId() |
| | | + " getNextEligibleMessageForDomain(" + opid+ ") " |
| | | + "newMsg isEligible=" + isEligible + " since " |
| | |
| | | throws DirectoryException |
| | | { |
| | | String crossDomainStartState; |
| | | |
| | | try |
| | | { |
| | | draftCompat = true; |
| | |
| | | // startDraftCN (from the request filter) is present in the draftCnDb |
| | | // Get an iterator to traverse the draftCNDb |
| | | draftCNDbIter = |
| | | draftCNDb.generateIterator(draftCNDb.getFirstKey()); |
| | | draftCNDb.generateIterator(startDraftCN); |
| | | } |
| | | else |
| | | { |
| | |
| | | newDomainCtxt.startState = startStates.remove(rsd.getBaseDn()); |
| | | if ((providedCookie==null)||(providedCookie.length()==0) |
| | | ||allowUnknownDomains) |
| | | newDomainCtxt.startState = new ServerState(); |
| | | { |
| | | if (newDomainCtxt.startState == null) |
| | | newDomainCtxt.startState = new ServerState(); |
| | | } |
| | | else |
| | | if (newDomainCtxt.startState == null) |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | |
| | | try |
| | | { |
| | | |
| | | // Search / no DraftCN / not persistent |
| | | // ----------------------------------- |
| | | // init: all domain are candidate |
| | | // get one msg from each |
| | | // no (null) msg returned: should not happen since we go to a state |
| | | // that is computed/expected |
| | | // getMessage: |
| | | // get the oldest msg: |
| | | // after: |
| | |
| | | // get one msg from that domain |
| | | // no (null) msg returned: should not happen since we go to a state |
| | | // that is computed/expected |
| | | // step 2: send DoneMsg |
| | | |
| | | // Persistent: |
| | | // ---------- |
| | |
| | | { |
| | | // let's traverse the DraftCNdb searching for the change |
| | | // found in the changelogDb. |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("getNextECLUpdate generating draftCN " |
| | | + " will skip " + cnFromDraftCNDb |
| | | + " and read next change from the DraftCNDb."); |
| | | |
| | | isEndOfDraftCNReached = (draftCNDbIter.next()==false); |
| | | |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("getNextECLUpdate generating draftCN " |
| | | + " has skiped to " |
| | | + " sn=" + draftCNDbIter.getDraftCN() |
| | |
| | | // the change from the changelogDb is older |
| | | // it should have been stored lately |
| | | // let's continue to traverse the changelogdb |
| | | if (debugEnabled()) |
| | | TRACER.debugInfo("getNextECLUpdate: will skip " |
| | | + cnFromChangelogDb |
| | | + " and read next from the regular changelog."); |