for (final Iterator<DocumentImpl> i = docs.getDocumentIterator(); i.hasNext(); ) {
final DocumentImpl next = i.next();
if(next.getMetadata().getSplitCount() > splitCount)
{try {
next.getUpdateLock().acquire(Lock.WRITE_LOCK);
broker.defragXMLResource(transaction, next);
} finally {
next.getUpdateLock().release(Lock.WRITE_LOCK);
}}
broker.checkXMLResourceConsistency(next);
}