Tabnine Logo
DriverDelegate.selectNumTriggersForJob
Code IndexAdd Tabnine to your IDE (free)

How to use
selectNumTriggersForJob
method
in
org.quartz.impl.jdbcjobstore.DriverDelegate

Best Java code snippets using org.quartz.impl.jdbcjobstore.DriverDelegate.selectNumTriggersForJob (Showing top 4 results out of 315)

origin: quartz-scheduler/quartz

protected boolean removeTrigger(Connection conn, TriggerKey key)
  throws JobPersistenceException {
  boolean removedTrigger;
  try {
    // this must be called before we delete the trigger, obviously
    JobDetail job = getDelegate().selectJobForTrigger(conn,
        getClassLoadHelper(), key, false);
    removedTrigger = 
      deleteTriggerAndChildren(conn, key);
    if (null != job && !job.isDurable()) {
      int numTriggers = getDelegate().selectNumTriggersForJob(conn,
          job.getKey());
      if (numTriggers == 0) {
        // Don't call removeJob() because we don't want to check for
        // triggers again.
        deleteJobAndChildren(conn, job.getKey());
      }
    }
  } catch (ClassNotFoundException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  } catch (SQLException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  }
  return removedTrigger;
}
origin: quartz-scheduler/quartz

protected boolean removeTrigger(Connection conn, TriggerKey key)
  throws JobPersistenceException {
  boolean removedTrigger;
  try {
    // this must be called before we delete the trigger, obviously
    JobDetail job = getDelegate().selectJobForTrigger(conn,
        getClassLoadHelper(), key, false);
    removedTrigger = 
      deleteTriggerAndChildren(conn, key);
    if (null != job && !job.isDurable()) {
      int numTriggers = getDelegate().selectNumTriggersForJob(conn,
          job.getKey());
      if (numTriggers == 0) {
        // Don't call removeJob() because we don't want to check for
        // triggers again.
        deleteJobAndChildren(conn, job.getKey());
      }
    }
  } catch (ClassNotFoundException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  } catch (SQLException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  }
  return removedTrigger;
}
origin: com.opensymphony.quartz/com.springsource.org.quartz

protected boolean removeTrigger(Connection conn, SchedulingContext ctxt,
    String triggerName, String groupName)
  throws JobPersistenceException {
  boolean removedTrigger = false;
  try {
    // this must be called before we delete the trigger, obviously
    JobDetail job = getDelegate().selectJobForTrigger(conn,
        triggerName, groupName, getClassLoadHelper());
    removedTrigger = 
      deleteTriggerAndChildren(conn, triggerName, groupName);
    if (null != job && !job.isDurable()) {
      int numTriggers = getDelegate().selectNumTriggersForJob(conn,
          job.getName(), job.getGroup());
      if (numTriggers == 0) {
        // Don't call removeJob() because we don't want to check for
        // triggers again.
        deleteJobAndChildren(conn, ctxt, job.getName(), job.getGroup());
      }
    }
  } catch (ClassNotFoundException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  } catch (SQLException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  }
  return removedTrigger;
}
origin: quartz/quartz-all

protected boolean removeTrigger(Connection conn, SchedulingContext ctxt,
    String triggerName, String groupName)
  throws JobPersistenceException {
  boolean removedTrigger = false;
  try {
    // this must be called before we delete the trigger, obviously
    JobDetail job = getDelegate().selectJobForTrigger(conn,
        triggerName, groupName, getClassLoadHelper());
    removedTrigger = 
      deleteTriggerAndChildren(conn, triggerName, groupName);
    if (null != job && !job.isDurable()) {
      int numTriggers = getDelegate().selectNumTriggersForJob(conn,
          job.getName(), job.getGroup());
      if (numTriggers == 0) {
        // Don't call removeJob() because we don't want to check for
        // triggers again.
        deleteJobAndChildren(conn, ctxt, job.getName(), job.getGroup());
      }
    }
  } catch (ClassNotFoundException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  } catch (SQLException e) {
    throw new JobPersistenceException("Couldn't remove trigger: "
        + e.getMessage(), e);
  }
  return removedTrigger;
}
org.quartz.impl.jdbcjobstoreDriverDelegateselectNumTriggersForJob

Javadoc

Select the number of triggers associated with a given job.

Popular methods of DriverDelegate

  • calendarExists
    Check whether or not a calendar exists.
  • calendarIsReferenced
    Check whether or not a calendar is referenced by any triggers.
  • deleteCalendar
    Delete a calendar.
  • deleteFiredTrigger
    Delete a fired trigger.
  • deleteFiredTriggers
    Delete all fired triggers of the given instance.
  • deleteJobDetail
    Delete the job detail record for the given job.
  • deletePausedTriggerGroup
  • deleteSchedulerState
    Delete a scheduler-instance state record.
  • deleteTrigger
    Delete the base trigger data for a trigger.
  • insertCalendar
    Insert a new calendar.
  • insertFiredTrigger
    Insert a fired trigger.
  • insertJobDetail
    Insert the job detail record.
  • insertFiredTrigger,
  • insertJobDetail,
  • insertPausedTriggerGroup,
  • insertSchedulerState,
  • insertTrigger,
  • isTriggerGroupPaused,
  • jobExists,
  • selectCalendar,
  • selectCalendars,
  • selectFiredTriggerInstanceNames

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Option (scala)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now