protected void addDefaultTriggerPersistenceDelegates() { addTriggerPersistenceDelegate(new SimpleTriggerPersistenceDelegate()); addTriggerPersistenceDelegate(new CronTriggerPersistenceDelegate()); addTriggerPersistenceDelegate(new CalendarIntervalTriggerPersistenceDelegate()); addTriggerPersistenceDelegate(new DailyTimeIntervalTriggerPersistenceDelegate()); }
private void setExpandedSQL() { if (getTablePrefix() != null && getSchedName() != null && sql != null && insertSql != null) { expandedSQL = Util.rtp(this.sql, getTablePrefix(), getSchedulerNameLiteral()); expandedInsertSQL = Util.rtp(this.insertSql, getTablePrefix(), getSchedulerNameLiteral()); } }
/** * Delete a trigger, its listeners, and its Simple/Cron/BLOB sub-table entry. * * @see #removeJob(java.sql.Connection, org.quartz.JobKey) * @see #removeTrigger(Connection, TriggerKey) * @see #replaceTrigger(Connection, TriggerKey, OperableTrigger) */ private boolean deleteTriggerAndChildren(Connection conn, TriggerKey key) throws SQLException, NoSuchDelegateException { return (getDelegate().deleteTrigger(conn, key) > 0); }
ClusterManager() { this.setPriority(Thread.NORM_PRIORITY + 2); this.setName("QuartzScheduler_" + instanceName + "-" + instanceId + "_ClusterManager"); this.setDaemon(getMakeThreadsDaemons()); }
protected void releaseLock(String lockName, boolean doIt) { if (doIt) { try { getLockHandler().releaseLock(lockName); } catch (LockException le) { getLog().error("Error returning lock: " + le.getMessage(), le); } } }
MisfireHandler() { this.setName("QuartzScheduler_" + instanceName + "-" + instanceId + "_MisfireHandler"); this.setDaemon(getMakeThreadsDaemons()); }
/** * Delete a job and its listeners. * * @see #removeJob(java.sql.Connection, org.quartz.JobKey) * @see #removeTrigger(Connection, TriggerKey) */ private boolean deleteJobAndChildren(Connection conn, JobKey key) throws NoSuchDelegateException, SQLException { return (getDelegate().deleteJobDetail(conn, key) > 0); }
private void setTriggerStateProperties(OperableTrigger trigger, TriggerPropertyBundle props) throws JobPersistenceException { if(props.getStatePropertyNames() == null) return; Util.setBeanProps(trigger, props.getStatePropertyNames(), props.getStatePropertyValues()); }
/** * <p> * Replace the table prefix in a query by replacing any occurrences of * "{0}" with the table prefix. * </p> * * @param query * the unsubstitued query * @return the query, with proper table prefix substituted */ protected final String rtp(String query) { return Util.rtp(query, tablePrefix, getSchedulerNameLiteral()); }
protected void deleteTriggerExtension(Connection conn, TriggerKey triggerKey) throws SQLException { for(TriggerPersistenceDelegate tDel: triggerPersistenceDelegates) { if(tDel.deleteExtendedTriggerProperties(conn, triggerKey) > 0) return; // as soon as one affects a row, we're done. } deleteBlobTrigger(conn, triggerKey); }
ClusterManager() { this.setPriority(Thread.NORM_PRIORITY + 2); this.setName("QuartzScheduler_" + instanceName + "-" + instanceId + "_ClusterManager"); this.setDaemon(getMakeThreadsDaemons()); }
protected void releaseLock(String lockName, boolean doIt) { if (doIt) { try { getLockHandler().releaseLock(lockName); } catch (LockException le) { getLog().error("Error returning lock: " + le.getMessage(), le); } } }
private void setExpandedSQL() { if (getTablePrefix() != null && getSchedName() != null && sql != null && insertSql != null) { expandedSQL = Util.rtp(this.sql, getTablePrefix(), getSchedulerNameLiteral()); expandedInsertSQL = Util.rtp(this.insertSql, getTablePrefix(), getSchedulerNameLiteral()); } }
MisfireHandler() { this.setName("QuartzScheduler_" + instanceName + "-" + instanceId + "_MisfireHandler"); this.setDaemon(getMakeThreadsDaemons()); }
protected void addDefaultTriggerPersistenceDelegates() { addTriggerPersistenceDelegate(new SimpleTriggerPersistenceDelegate()); addTriggerPersistenceDelegate(new CronTriggerPersistenceDelegate()); addTriggerPersistenceDelegate(new CalendarIntervalTriggerPersistenceDelegate()); addTriggerPersistenceDelegate(new DailyTimeIntervalTriggerPersistenceDelegate()); }
/** * Delete a trigger, its listeners, and its Simple/Cron/BLOB sub-table entry. * * @see #removeJob(java.sql.Connection, org.quartz.JobKey) * @see #removeTrigger(Connection, TriggerKey) * @see #replaceTrigger(Connection, TriggerKey, OperableTrigger) */ private boolean deleteTriggerAndChildren(Connection conn, TriggerKey key) throws SQLException, NoSuchDelegateException { return (getDelegate().deleteTrigger(conn, key) > 0); }
/** * Delete a job and its listeners. * * @see #removeJob(java.sql.Connection, org.quartz.JobKey) * @see #removeTrigger(Connection, TriggerKey) */ private boolean deleteJobAndChildren(Connection conn, JobKey key) throws NoSuchDelegateException, SQLException { return (getDelegate().deleteJobDetail(conn, key) > 0); }
private void setTriggerStateProperties(OperableTrigger trigger, TriggerPropertyBundle props) throws JobPersistenceException { if(props.getStatePropertyNames() == null) return; Util.setBeanProps(trigger, props.getStatePropertyNames(), props.getStatePropertyValues()); }
/** * <p> * Replace the table prefix in a query by replacing any occurrences of * "{0}" with the table prefix. * </p> * * @param query * the unsubstitued query * @return the query, with proper table prefix substituted */ protected final String rtp(String query) { return Util.rtp(query, tablePrefix, getSchedulerNameLiteral()); }
protected void deleteTriggerExtension(Connection conn, TriggerKey triggerKey) throws SQLException { for(TriggerPersistenceDelegate tDel: triggerPersistenceDelegates) { if(tDel.deleteExtendedTriggerProperties(conn, triggerKey) > 0) return; // as soon as one affects a row, we're done. } deleteBlobTrigger(conn, triggerKey); }