OperationStatus status;
while (true) {
assert Latch.countLatchesHeld() == 0;
CursorImpl dup = beginRead(true);
try {
if (getMode == GetMode.NEXT) {
status = dup.getNext
(key, data, lockType, true, false);
} else if (getMode == GetMode.PREV) {
status = dup.getNext
(key, data, lockType, false, false);
} else if (getMode == GetMode.NEXT_DUP) {
status = dup.getNextDuplicate
(key, data, lockType, true, false);
} else if (getMode == GetMode.PREV_DUP) {
status = dup.getNextDuplicate
(key, data, lockType, false, false);
} else if (getMode == GetMode.NEXT_NODUP) {
status = dup.getNextNoDup
(key, data, lockType, true, false);
} else if (getMode == GetMode.PREV_NODUP) {
status = dup.getNextNoDup
(key, data, lockType, false, false);
} else {
throw new InternalException("unknown GetMode");
}
} catch (DatabaseException DBE) {