Returns a consolidated trigger to call for delete operations, or null if
none. If not null, the consolidated trigger is not a snapshot -- it will
change as the set of triggers in this manager changes.
502300
public Trigger<? super S> getDeleteTrigger() {
        ForDelete<S> forDelete = mForDelete;
        return forDelete.isEmpty() ? null : forDelete;
    }
354161
function(){
      Dataset.flushChanges(this);

      var deleted = this.getItems();
      var listenHandler = this.listen.item;
      var delta;

      if (deleted.length)
      {
        if (listenHandler)
          for (var i = 0; i < deleted.length; i++)
            deleted[i].removeHandler(listenHandler, this);

        this.emit_itemsChanged(delta = {
          deleted: deleted
        });

        this.members_ = {};
      }

      return delta;
    }
406751
void rollback(ItemData item) throws InvalidItemStateException, RepositoryException
   {
      // remove from changes log (Session pending changes)
      PlainChangesLog slog = changesLog.pushLog(item.getQPath());
      SessionChangesLog changes = new SessionChangesLog(slog.getAllStates(), session);

      for (Iterator<ItemImpl> removedIter = invalidated.iterator(); removedIter.hasNext();)
      {
         ItemImpl removed = removedIter.next();

         QPath removedPath = removed.getLocation().getInternalPath();
         ItemState rstate = changes.getItemState(removedPath);

         if (rstate != null)
         {
            if (rstate.isRenamed() || rstate.isPathChanged())
            {
               // find DELETED
               rstate = changes.findItemState(rstate.getData().getIdentifier(), false, new int[]{ItemState.DELETED});
               if (rstate == null)
               {
                  continue;
               }
            }

            NodeData parent = (NodeData)transactionableManager.getItemData(rstate.getData().getParentIdentifier());
            if (parent != null)
            {
               ItemData persisted =
                  transactionableManager.getItemData(parent, rstate.getData().getQPath().getEntries()[rstate.getData()
                     .getQPath().getEntries().length - 1], ItemType.getItemType(rstate.getData()));

               if (persisted != null)
               {
                  // reload item data
                  removed.loadData(persisted);
               }
            } // else it's transient item
         }
         else if (removed.getData() != null)
         {
            // No states for items left usecase
            ItemData persisted = transactionableManager.getItemData(removed.getData().getIdentifier());

            if (persisted != null)
            {
               // reload item data
               removed.loadData(persisted);
            }
         }

         removedIter.remove();
      }
   }
434224
@Override
  public TriggerInstance getTriggerInstanceByFlowExecId(final int flowExecId) {
    if (flowExecId == Constants.FAILED_EXEC_ID || flowExecId == Constants.UNASSIGNED_EXEC_ID) {
      return null;
    }
    TriggerInstance triggerInstance = null;
    try {
      final Collection<TriggerInstance> res = this.dbOperator
          .query(SELECT_EXECUTIONS_BY_EXEC_ID,
              new TriggerInstanceHandler(SORT_MODE.SORT_ON_START_TIME_ASC), flowExecId);
      triggerInstance = !res.isEmpty() ? res.iterator().next() : null;
    } catch (final SQLException ex) {
      handleSQLException(ex);
    }
    populateFlowTriggerProperties(triggerInstance);
    return triggerInstance;
  }
252662
def sort(self):
        
        # Sort triggers by word and character length first
        for priority, triggers in self._triggers.items():
            self._log.debug('Sorting priority {priority} triggers'.format(priority=priority))

            # Get and sort our atomic and wildcard patterns
            atomics = [trigger for trigger in triggers if trigger.pattern_is_atomic]
            wildcards = [trigger for trigger in triggers if not trigger.pattern_is_atomic]

            atomics = sorted(atomics, key=lambda trigger: (trigger.pattern_words, trigger.pattern_len), reverse=True)
            wildcards = sorted(wildcards, key=lambda trigger: (trigger.pattern_words, trigger.pattern_len),
                               reverse=True)

            # Replace our sorted triggers
            self._triggers[priority] = atomics + wildcards

        # Finally, sort triggers by priority
        self._sorted_triggers = []

        for triggers in [self._triggers[priority] for priority in sorted(self._triggers.keys(), reverse=True)]:
            for trigger in triggers:
                self._sorted_triggers.append(trigger)

        self.sorted = True
1316014
public static void removeTrigger(String triggerName) throws SundialSchedulerException {

    try {
      getScheduler().unscheduleJob(triggerName);
    } catch (SchedulerException e) {
      throw new SundialSchedulerException("ERROR REMOVING TRIGGER!!!", e);
    }
  }
181313
@Override
	public boolean changeTrigger(JobTriggerTO triggerTO, boolean add) throws SchedulerException {
		if (!config.isChangeTriggerAllowed()) {
			LOGGER.warn("not allowed to change any trigger");
			return false;
		}
		JobDetail detail = findJob(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName());
		if (null == detail) {
			return false;
		}
		Trigger trigger = findTrigger(triggerTO.getOriginalJobGroup(), triggerTO.getOriginalJobName(), 
				triggerTO.getOriginalTriggerGroup(), triggerTO.getOriginalTriggerName());
		if(null == trigger) {
			if (add) {
				this.scheduler.scheduleJob(buildTrigger(detail, null, triggerTO));
				return true;
			}
			return false;
		}
		this.scheduler.rescheduleJob(trigger.getKey(), buildTrigger(detail, trigger, triggerTO));
		return true;
	}
185202
def triggers(self):
        
        self._triggers, value = self.get_attr_set(self._triggers, 'trigger')
        return value
210731
public static TriggerContext on(Collection<Trigger> triggers) {
        List<Trigger> addedTriggers = new ArrayList<Trigger>();
        if (triggers != null) {
            addedTriggers.addAll(triggers);
        }
        return new TriggerContext(addedTriggers);
    }
226864
boolean tryDeleteReplica(Storable replica) throws PersistException {
        // Prevent trigger from being invoked by deleting replica.
        TriggerManager tm = mTriggerManager;
        tm.locallyDisableDelete();
        try {
            return replica.tryDelete();
        } finally {
            tm.locallyEnableDelete();
        }
    }
1169011
public java.util.List<Trigger> getTriggers() {
        if (triggers == null) {
            triggers = new com.amazonaws.internal.SdkInternalList<Trigger>();
        }
        return triggers;
    }
1228022
private DeleteStack getDeleteStack()
    {
        Object x = _deleteStack.get();
        DeleteStack g = null;
        if (x != null)
        {
            g = (DeleteStack) x;
            g.reset();
        }
        else
        {
            g = new DeleteStack(this);
            x = (Object) g;
            _deleteStack.set(x);
        }
        return g;
    }
298808
@Override
  public synchronized void addTrigger(final Trigger t) throws TriggerLoaderException {
    logger.info("Inserting trigger " + t.toString() + " into db.");

    final SQLTransaction<Long> insertAndGetLastID = transOperator -> {
      transOperator.update(ADD_TRIGGER, DateTime.now().getMillis());
      // This commit must be called in order to unlock trigger table and have last insert ID.
      transOperator.getConnection().commit();
      return transOperator.getLastInsertId();
    };

    try {
      final long id = this.dbOperator.transaction(insertAndGetLastID);
      t.setTriggerId((int) id);
      updateTrigger(t);
      logger.info("uploaded trigger " + t.getDescription());
    } catch (final SQLException ex) {
      logger.error("Adding Trigger " + t.getTriggerId() + " failed.");
      throw new TriggerLoaderException("trigger id is not properly created.", ex);
    }
  }
83598
def register_on_snapshot_deleted(self, callback):
        
        event_type = library.VBoxEventType.on_snapshot_deleted
        return self.event_source.register_callback(callback, event_type)
642918
def trigger_revisions(self, trigger_id, **kwargs):
        ""
        api_path = "/api/v2/triggers/{trigger_id}/revisions.json"
        api_path = api_path.format(trigger_id=trigger_id)
        return self.call(api_path, **kwargs)
362848
public String getTrigger() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "getTrigger returning " + trigger);
        return this.trigger;
    }
705785
protected int onUpdateDeleteEvent()
    {
        if (kunderaQuery.isDeleteUpdate())
        {
            List result = fetch();

            onDeleteOrUpdate(result);
            return result != null ? result.size() : 0;
        }

        return 0;

    }