* @see org.apache.james.mailbox.MessageManager#expunge(org.apache.james.mailbox.model.MessageRange,
* org.apache.james.mailbox.MailboxSession)
*/
public Iterator<Long> expunge(final MessageRange set, MailboxSession mailboxSession) throws MailboxException {
if (!isWriteable(mailboxSession)) {
throw new ReadOnlyException(new StoreMailboxPath<Id>(getMailboxEntity()), mailboxSession.getPathDelimiter());
}
Map<Long, MessageMetaData> uids = deleteMarkedInMailbox(set, mailboxSession);
dispatcher.expunged(mailboxSession, uids, getMailboxEntity());
return uids.keySet().iterator();