org.quartz.impl.jdbcjobstore.Constants的实例源码

项目:Winder    文件QuartzSchedulerManager.java   
private QuartzJobDetail makeJobDetail(CascadingClassLoadHelper cascadingClassLoadHelper,ResultSet rs) throws sqlException,ClassNotFoundException,IOException {
    JobDetailImpl jobDetail = new JobDetailImpl();

    String groupName = rs.getString(Constants.COL_JOB_GROUP);
    String jobName = rs.getString(Constants.COL_JOB_NAME);
    jobDetail.setName(jobName);
    jobDetail.setGroup(groupName);
    jobDetail.setDescription(rs.getString(Constants.COL_DESCRIPTION));
    jobDetail.setJobClass(
            cascadingClassLoadHelper.loadClass(rs.getString(Constants.COL_JOB_CLASS),Job.class)
    );
    jobDetail.setDurability(rs.getBoolean(Constants.COL_IS_DURABLE));
    jobDetail.setRequestsRecovery(rs.getBoolean(Constants.COL_REQUESTS_RECOVERY));

    Map<?,?> map = (Map<?,?>) getobjectFromBlob(rs,COL_JOB_DATAMAP);

    if (map != null) {
        jobDetail.setJobDataMap(new JobDataMap(map));
    }

    JobId jobId = new QuartzJobId(groupName,jobName,engine.getClusterName());

    QuartzJobDetail quartzJobDetail = new QuartzJobDetail(engine,jobId,jobDetail,rs.getTimestamp(WinderJDBCDelegate.COL_JOB_CREATED));
    return quartzJobDetail;
}
项目:syncope    文件JobManagerImpl.java   
private boolean isRunningElsewhere(final JobKey jobKey) throws SchedulerException {
    if (!scheduler.getScheduler().getMetaData().isJobStoreClustered()) {
        return false;
    }

    DataSource dataSource = domainsHolder.getDomains().get(SyncopeConstants.MASTER_DOMAIN);
    Connection conn = DataSourceUtils.getConnection(dataSource);
    PreparedStatement stmt = null;
    ResultSet resultSet = null;
    try {
        stmt = conn.prepareStatement(
                "SELECT 1 FROM " + Constants.DEFAULT_TABLE_PREFIX + "FIRED_TRIGGERS "
                + "WHERE JOB_NAME = ? AND JOB_GROUP = ?");
        stmt.setString(1,jobKey.getName());
        stmt.setString(2,jobKey.getGroup());

        resultSet = stmt.executeQuery();
        return resultSet.next();
    } catch (sqlException e) {
        throw new SchedulerException(e);
    } finally {
        IoUtil.quietClose(resultSet);
        IoUtil.quietClose(stmt);
        DataSourceUtils.releaseConnection(conn,dataSource);
    }
}
项目:quartz-couchdb-store    文件CouchDbStore.java   
@Override
public void pauseTrigger(TriggerKey triggerKey) throws JobPersistenceException {
    triggerStore.updateTriggerState(triggerKey,Constants.STATE_WAITING);
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...