code: @Override
    public void storeTrigger(OperableTrigger newTrigger, boolean replaceExisting)
        throws JobPersistenceException {
  
      TriggerWrapper tw = new TriggerWrapper((OperableTrigger) newTrigger.clone());
  
      synchronized (lock) {
        if (wrappedTriggersByKey.get(tw.key) != null) {
          if (!replaceExisting) {
            throw new ObjectAlreadyExistsException(newTrigger);
          }
  
          removeTrigger(newTrigger.getName());
        }
  
        if (retrieveJob(newTrigger.getJobName()) == null) {
          throw new JobPersistenceException(
              "The job (" + newTrigger.getJobName() + ") referenced by the trigger does not exist.");
        }
  
        // add to triggers array
        wrappedTriggers.add(tw);
  
        // add to triggers by FQN map
        wrappedTriggersByKey.put(tw.key, tw);
  
        if (blockedJobs.contains(tw.jobKey)) {
          tw.state = TriggerWrapper.STATE_BLOCKED;
        } else {
          timeWrappedTriggers.add(tw);
        }
      }
    }
docs: Store the given <code>{@link org.quartz.triggers.Trigger}</code>.
  
  @param newTrigger The <code>Trigger</code> to be stored.
  @param replaceExisting If <code>true</code>, any <code>Trigger</code> existing in the <code>
  JobStore</code> with the same name & group should be over-written.
  @throws ObjectAlreadyExistsException if a <code>Trigger</code> with the same name/group already
  exists, and replaceExisting is set to false.
  @see #pauseTriggerGroup(SchedulingContext, String)