i < origBIN.getNEntries();
i++) {
if (!origBIN.isEntryKnownDeleted(i)) {
Node n = origBIN.fetchTarget(i);
if (n != null && !n.containsDuplicates()) {
LN ln = (LN) n;
/* See comment above about locking. */
if (!ln.isDeleted()) {
ret = true;
break;
}
}
} else {
/* Need to check the DupCountLN. */
}
}
}
} else {
if (origCursor.getIndex() > 0) {
/*
* We were adjusted to something other than the first
* entry so some insertion happened.
*/
DatabaseImpl database = origBIN.getDatabase();
for (int i = 0; i < origCursor.getIndex(); i++) {
if (!origBIN.isEntryKnownDeleted(i)) {
Node n = origBIN.fetchTarget(i);
if (n != null && !n.containsDuplicates()) {
LN ln = (LN) n;
/* See comment above about locking. */
if (!ln.isDeleted()) {
ret = true;
break;
}
} else {
/* Need to check the DupCountLN. */
}
}
}
}
}
}
origCursor.releaseBINs();
return ret;
}
if (origDBIN != dupCursor.getDupBIN() &&
origCursor.getIndex() == dupCursor.getIndex() &&
getMode != GetMode.NEXT_NODUP &&
getMode != GetMode.PREV_NODUP) {
/* Same as above, only for the dupBIN. */
origCursor.latchBINs();
if (forward) {
if (origDBIN.getNEntries() - 1 >
origCursor.getDupIndex()) {
/*
* We were adjusted to something other than the last entry
* so some insertion happened.
*/
DatabaseImpl database = origDBIN.getDatabase();
for (int i = origCursor.getDupIndex() + 1;
i < origDBIN.getNEntries();
i++) {
if (!origDBIN.isEntryKnownDeleted(i)) {
Node n = origDBIN.fetchTarget(i);
LN ln = (LN) n;
/* See comment above about locking. */
if (n != null && !ln.isDeleted()) {
ret = true;
break;
}
}
}
}
} else {
if (origCursor.getDupIndex() > 0) {
/*
* We were adjusted to something other than the first entry
* so some insertion happened.
*/
DatabaseImpl database = origDBIN.getDatabase();
for (int i = 0; i < origCursor.getDupIndex(); i++) {
if (!origDBIN.isEntryKnownDeleted(i)) {
Node n = origDBIN.fetchTarget(i);
LN ln = (LN) n;
/* See comment above about locking. */
if (n != null && !ln.isDeleted()) {
ret = true;
break;
}
}
}