| | |
| | | import org.opends.server.replication.protocol.UpdateMsg; |
| | | import org.opends.server.replication.server.changelog.api.ChangelogException; |
| | | import org.opends.server.replication.server.changelog.api.DBCursor; |
| | | import org.opends.server.replication.server.changelog.je.ReplicationDB.*; |
| | | import org.opends.server.replication.server.changelog.je.ReplicationDB.ReplServerDBCursor; |
| | | |
| | | /** |
| | | * Berkeley DB JE implementation of {@link DBCursor}. |
| | |
| | | final ReplServerDBCursor localCursor = cursor; |
| | | currentChange = localCursor != null ? localCursor.next() : null; |
| | | |
| | | if (currentChange != null) |
| | | { |
| | | lastNonNullCurrentCSN = currentChange.getCSN(); |
| | | } |
| | | else |
| | | if (currentChange == null) |
| | | { |
| | | synchronized (this) |
| | | { |
| | |
| | | // and fixing such issue with unit tests. |
| | | cursor = db.openReadCursor(lastNonNullCurrentCSN); |
| | | currentChange = cursor.next(); |
| | | if (currentChange != null) |
| | | { |
| | | lastNonNullCurrentCSN = currentChange.getCSN(); |
| | | } |
| | | } |
| | | } |
| | | return currentChange != null; |
| | | if (currentChange != null) |
| | | { |
| | | lastNonNullCurrentCSN = currentChange.getCSN(); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |