final Thread thread = Thread.currentThread();
for(int idx = 0; idx < documentCount; idx++) {
d = nodes[documentOffsets[idx]].getDocument();
dlock = d.getUpdateLock();
if(exclusive)
{dlock.release(Lock.WRITE_LOCK);}
else if (dlock.isLockedForRead(thread))
{dlock.release(Lock.READ_LOCK);}
}
}