| | |
| | | private String findCookie(final int startDraftCN) throws ChangelogException, |
| | | DirectoryException |
| | | { |
| | | ChangelogDB changelogDB = replicationServer.getChangelogDB(); |
| | | final ChangelogDB changelogDB = replicationServer.getChangelogDB(); |
| | | |
| | | if (startDraftCN <= 1) |
| | | { |
| | |
| | | return null; |
| | | } |
| | | |
| | | final int firstKey = changelogDB.getFirstKey(); |
| | | String crossDomainStartState = changelogDB.getPreviousCookie(firstKey); |
| | | changelogDBIter = changelogDB.generateIterator(firstKey); |
| | | final int firstDraftCN = changelogDB.getFirstDraftCN(); |
| | | final String crossDomainStartState = |
| | | changelogDB.getPreviousCookie(firstDraftCN); |
| | | changelogDBIter = changelogDB.generateIterator(firstDraftCN); |
| | | return crossDomainStartState; |
| | | } |
| | | |
| | |
| | | return null; |
| | | } |
| | | |
| | | final int lastKey = changelogDB.getLastKey(); |
| | | final int lastKey = changelogDB.getLastDraftCN(); |
| | | crossDomainStartState = changelogDB.getPreviousCookie(lastKey); |
| | | changelogDBIter = changelogDB.generateIterator(lastKey); |
| | | return crossDomainStartState; |