| | |
| | | */ |
| | | public String dumpState() |
| | | { |
| | | return this.getClass().getCanonicalName() + |
| | | return getClass().getCanonicalName() + |
| | | "[" + |
| | | "[draftCompat=" + draftCompat + |
| | | "] [persistent=" + isPersistent + |
| | |
| | | .append(rsd).append("] [nextMsg=").append(nextMsg).append("(") |
| | | .append(nextMsg != null ? |
| | | new Date(nextMsg.getChangeNumber().getTime()).toString():"") |
| | | .append(")" + "] [nextNonEligibleMsg=").append(nextNonEligibleMsg) |
| | | .append(")") |
| | | .append("] [nextNonEligibleMsg=").append(nextNonEligibleMsg) |
| | | .append("] [startState=").append(startState).append("] [stopState=") |
| | | .append(stopState).append("] [currentState=").append(currentState) |
| | | .append("]]"); |
| | |
| | | + " getNextEligibleMessageForDomain(" + opid+ ") " |
| | | + "newMsg isEligible=" + isEligible + " since " |
| | | + "newMsg=[" + newMsg.getChangeNumber() |
| | | + " " + new Date(newMsg.getChangeNumber().getTime()).toString() |
| | | + " " + new Date(newMsg.getChangeNumber().getTime()) |
| | | + "] eligibleCN=[" + eligibleCN |
| | | + " " + new Date(eligibleCN.getTime()).toString()+"]" |
| | | + " " + new Date(eligibleCN.getTime())+"]" |
| | | + dumpState()); |
| | | |
| | | if (isEligible) |
| | |
| | | { |
| | | // no chance to have a bad domain set here |
| | | } |
| | | this.initialize(startECLSessionMsg); |
| | | initialize(startECLSessionMsg); |
| | | } |
| | | |
| | | /** |
| | |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | if (draftCNDbIter != null) |
| | | draftCNDbIter.releaseCursor(); |
| | | throw(de); |
| | | throw de; |
| | | } |
| | | catch(Exception e) |
| | | { |
| | |
| | | rsd.getStartState().getMaxChangeNumber(aServerId); |
| | | ChangeNumber providedChange = |
| | | newDomainCtxt.startState.getMaxChangeNumber(aServerId); |
| | | if ((providedChange != null) |
| | | && (providedChange.older(dbOldestChange))) |
| | | if (providedChange != null |
| | | && providedChange.older(dbOldestChange)) |
| | | { |
| | | cookieTooOld=true; |
| | | } |
| | |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, |
| | | ERR_RESYNC_REQUIRED_MISSING_DOMAIN_IN_PROVIDED_COOKIE.get( |
| | | missingDomains, |
| | | "<" + (providedCookie + missingDomains)+ ">")); |
| | | "<" + providedCookie + missingDomains + ">")); |
| | | } |
| | | |
| | | domainCtxts = tmpSet.toArray(new DomainContext[tmpSet.size()]); |
| | |
| | | { |
| | | // loop until not interrupted |
| | | } |
| | | } while (((interrupted) || (!acquired)) && (!shutdownWriter)); |
| | | } while ((interrupted || !acquired) && !shutdownWriter); |
| | | if (msg != null) |
| | | { |
| | | incrementOutCount(); |
| | |
| | | |
| | | int iDom; |
| | | boolean continueLooping = true; |
| | | while ((continueLooping) && (searchPhase == INIT_PHASE)) |
| | | while (continueLooping && searchPhase == INIT_PHASE) |
| | | { |
| | | // Step 1 & 2 |
| | | if (searchPhase == INIT_PHASE) |
| | |
| | | int oldest = -1; |
| | | for (int i=0; i<domainCtxts.length; i++) |
| | | { |
| | | if ((domainCtxts[i].active)) |
| | | if (domainCtxts[i].active) |
| | | { |
| | | // on the first loop, oldest==-1 |
| | | // .msg is null when the previous (non blocking) nextMessage did |