Location newMark = currentMark;
Iterator<AMQMessageStore> queueIterator = queues.values().iterator();
while (queueIterator.hasNext()) {
final AMQMessageStore ms = queueIterator.next();
Location mark = (Location)ms.getMark();
if (mark != null && (newMark == null || mark.compareTo(newMark) > 0)) {
newMark = mark;
}
}
Iterator<AMQTopicMessageStore> topicIterator = topics.values().iterator();
while (topicIterator.hasNext()) {