Пример #1
0
 void removeTrigger__wrappee__base(DatabaseTrigger trigger) throws DatabaseException {
   acquireTriggerListWriteLock();
   try {
     triggerList.remove(trigger);
     trigger.triggerRemoved(this);
   } finally {
     releaseTriggerListWriteLock();
   }
 }
Пример #2
0
 private void removeAllTriggers__wrappee__base() throws DatabaseException {
   acquireTriggerListWriteLock();
   try {
     for (int i = 0; i < triggerList.size(); i += 1) {
       DatabaseTrigger trigger = (DatabaseTrigger) triggerList.get(i);
       trigger.triggerRemoved(this);
     }
     triggerList.clear();
   } finally {
     releaseTriggerListWriteLock();
   }
 }
Пример #3
0
  /**
   * Adds a given trigger to the list of triggers. Called while opening a SecondaryDatabase.
   *
   * @param insertAtFront true to insert at the front, or false to append.
   */
  void addTrigger(DatabaseTrigger trigger, boolean insertAtFront) throws DatabaseException {

    acquireTriggerListWriteLock();
    try {
      if (insertAtFront) {
        triggerList.add(0, trigger);
      } else {
        triggerList.add(trigger);
      }
      trigger.triggerAdded(this);
    } finally {
      releaseTriggerListWriteLock();
    }
  }