ExpungedImpl expunged = (ExpungedImpl) event;
final Mailbox<Id> mailbox = expunged.getMailbox();
List<Long> uids = expunged.getUids();
List<MessageRange> ranges = MessageRange.toRanges(uids);
for (int i = 0; i < ranges.size(); i++) {
MessageRange range = ranges.get(i);
try {
delete(session, mailbox, range);
} catch (MailboxException e) {
session.getLog().debug("Unable to deleted range " + range.toString() + " from index for mailbox " + mailbox, e);
}
}
} else if (event instanceof FlagsUpdatedImpl) {
FlagsUpdatedImpl flagsUpdated = (FlagsUpdatedImpl) event;
final Mailbox<Id> mailbox = flagsUpdated.getMailbox();