void preDelete(ZoneInventory zinv) throws ZoneException { for (ZoneDeleteExtensionPoint extp : delExts) { try { extp.preDeleteZone(zinv); } catch (ZoneException ze) { logger.debug(String.format("extension[%s] refused to delete zone[name: %s, uuid:%s] because %s", extp.getClass().getName(), zinv.getName(), zinv.getUuid(), ze.getMessage())); throw ze; } catch (Exception e) { logger.warn("Exception happened while calling " + extp.getClass().getCanonicalName() + ".preDelete, " + "zone name: " + zinv.getName() + " uuid: " + zinv.getUuid(), e); } } }
void preChange(ZoneVO vo, ZoneStateEvent event) throws ZoneException { ZoneInventory zinv = ZoneInventory.valueOf(vo); ZoneState next = AbstractZone.getNextState(vo.getState(), event); for (ZoneChangeStateExtensionPoint extp : changeExts) { try { extp.preChangeZoneState(zinv, event, next); } catch (ZoneException ze) { logger.debug(String.format("Extension: %s refused zone change state operation[ZoneStateEvent:%s] because %s", extp.getClass() .getCanonicalName(), event, ze.getMessage())); throw ze; } catch (Exception e) { logger.warn("Exception happened while calling " + extp.getClass().getCanonicalName() + ".preChangeZoneState(), " + "zone name: " + zinv.getName() + " uuid: " + zinv.getUuid(), e); } } }
@Override public void run(List<MessageReply> replies) { if (!action.isActionCode(CascadeConstant.DELETION_FORCE_DELETE_CODE)) { for (MessageReply r : replies) { if (!r.isSuccess()) { completion.fail(r.getError()); return; } } } List<String> uuids = new ArrayList<String>(); for (MessageReply r : replies) { ZoneInventory inv = zones.get(replies.indexOf(r)); uuids.add(inv.getUuid()); logger.debug(String.format("delete zone[uuid:%s, name:%s]", inv.getUuid(), inv.getName())); } dbf.removeByPrimaryKeys(uuids, ZoneVO.class); completion.success(); } });
logger.debug("Changing state of clusters in zone: " + inventory.getName() + " uuid: " + inventory.getUuid() + " by event: " + clusterEvent); List<MessageReply> replies = bus.call(msgs); for (MessageReply r : replies) {