@Override public void dropWMTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath, String ns) throws NoSuchObjectException, InvalidOperationException, MetaException { boolean commited = false; try { openTransaction(); MWMResourcePlan resourcePlan = getMWMResourcePlan(resourcePlanName, ns, true); MWMPool pool = getPool(resourcePlan, poolPath); MWMTrigger trigger = getTrigger(resourcePlan, triggerName); pool.getTriggers().remove(trigger); trigger.getPools().remove(pool); pm.makePersistent(pool); pm.makePersistent(trigger); commited = commitTransaction(); } finally { rollbackAndCleanup(commited, (Query)null); } }
@Override public void createWMTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath, String ns) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException { boolean commited = false; try { openTransaction(); MWMResourcePlan resourcePlan = getMWMResourcePlan(resourcePlanName, ns, true); MWMPool pool = getPool(resourcePlan, poolPath); MWMTrigger trigger = getTrigger(resourcePlan, triggerName); pool.getTriggers().add(trigger); trigger.getPools().add(pool); pm.makePersistent(pool); pm.makePersistent(trigger); commited = commitTransaction(); } finally { rollbackAndCleanup(commited, (Query)null); } }
@Override public void dropWMTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath) throws NoSuchObjectException, InvalidOperationException, MetaException { boolean commited = false; try { openTransaction(); MWMResourcePlan resourcePlan = getMWMResourcePlan(resourcePlanName, true); MWMPool pool = getPool(resourcePlan, poolPath); MWMTrigger trigger = getTrigger(resourcePlan, triggerName); pool.getTriggers().remove(trigger); trigger.getPools().remove(pool); pm.makePersistent(pool); pm.makePersistent(trigger); commited = commitTransaction(); } finally { rollbackAndCleanup(commited, (Query)null); } }
@Override public void createWMTriggerToPoolMapping(String resourcePlanName, String triggerName, String poolPath) throws AlreadyExistsException, NoSuchObjectException, InvalidOperationException, MetaException { boolean commited = false; try { openTransaction(); MWMResourcePlan resourcePlan = getMWMResourcePlan(resourcePlanName, true); MWMPool pool = getPool(resourcePlan, poolPath); MWMTrigger trigger = getTrigger(resourcePlan, triggerName); pool.getTriggers().add(trigger); trigger.getPools().add(pool); pm.makePersistent(pool); pm.makePersistent(trigger); commited = commitTransaction(); } finally { rollbackAndCleanup(commited, (Query)null); } }