CLUSTER.clearTable(SUBSCRIPTIONS);
}
private static void fillSubscriptionList() throws SubscriptionException {
LOG.info("Creating subscription list");
SimpleSubscription subscription;
String user, mailbox;
subscriptionList = new HashMap<String, List<SimpleSubscription>>();
for (int i = 0; i < USERS; i++) {
user = "user" + i;
final List<SimpleSubscription> mailboxes = new ArrayList<SimpleSubscription>();
subscriptionList.put(user, mailboxes);
for (int j = 0; j < MAILBOX_NO; j++) {
if (j == 0) {
mailbox = "INBOX";
} else {
mailbox = "BOX" + j;
}
if ((i % 2 == 0) && (j > 0)) {
continue;
}
subscription = new SimpleSubscription(user, mailbox);
mailboxes.add(subscription);
mapper.save(subscription);
LOG.info("Adding subscription " + subscription);
}
}