Delete delete = new Delete(messageRowKey(message));
mailboxes.incrementColumnValue(mailboxRowKey(mailbox.getMailboxId()), MAILBOX_CF, MAILBOX_MESSAGE_COUNT, -1);
messages.delete(delete);
} catch (IOException ex) {
throw new MailboxException("Delete of message " + message + " failed in mailbox " + mailbox, ex);
} finally {
if (mailboxes != null) {
try {
mailboxes.close();
} catch (IOException ex) {
throw new MailboxException("Error closing table " + mailboxes, ex);
}
}
if (messages != null) {
try {
messages.close();
} catch (IOException ex) {
throw new MailboxException("Error closing table " + messages, ex);
}
}
}