removeSubscription(map, customerId, i);
}
}
private void addSubscription(IMap map, long customerId, final long productId) {
map.executeOnKey(customerId, new AbstractEntryProcessor() {
@Override
public Object process(Map.Entry entry) {
final Customer customer = (Customer) entry.getValue();
customer.addSubscription(new Subscription(productId, false));
entry.setValue(customer);