当前位置: 首页>>代码示例>>Java>>正文


Java JobDetail.setGroup方法代码示例

本文整理汇总了Java中org.quartz.JobDetail.setGroup方法的典型用法代码示例。如果您正苦于以下问题:Java JobDetail.setGroup方法的具体用法?Java JobDetail.setGroup怎么用?Java JobDetail.setGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.quartz.JobDetail的用法示例。


在下文中一共展示了JobDetail.setGroup方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: newJobDetail

import org.quartz.JobDetail; //导入方法依赖的package包/类
/**
 * @param cData
 * @return JobDetail
 */
public static JobDetail newJobDetail(CompositeData cData) {
	JobDetail jobDetail = new JobDetail();

	int i = 0;
	jobDetail.setName((String) cData.get(ITEM_NAMES[i++]));
	jobDetail.setGroup((String) cData.get(ITEM_NAMES[i++]));
	jobDetail.setDescription((String) cData.get(ITEM_NAMES[i++]));
	try {
		Class c = Class.forName((String) cData.get(ITEM_NAMES[i++]));
		jobDetail.setJobClass(c);
	} catch (ClassNotFoundException cnfe) {
		/**/
	}
	jobDetail.setJobDataMap(JobDataMapSupport
			.newJobDataMap((TabularData) cData.get(ITEM_NAMES[i++])));
	jobDetail.setVolatility((Boolean) cData.get(ITEM_NAMES[i++]));
	jobDetail.setDurability((Boolean) cData.get(ITEM_NAMES[i++]));
	jobDetail.setRequestsRecovery((Boolean) cData.get(ITEM_NAMES[i++]));

	return jobDetail;
}
 
开发者ID:AsuraTeam,项目名称:asura,代码行数:26,代码来源:JobDetailSupport.java

示例2: getJobDetail

import org.quartz.JobDetail; //导入方法依赖的package包/类
/**
 * Get the job detail.
 * 
 * @return - the job detail.
 */
private JobDetail getJobDetail()
{
    JobDataMap jobDataMap = new JobDataMap();
    jobDataMap.put(ACTION_JOB_DATA_MAP_KEY, this);

    JobDetail jobDetail = new JobDetail();
    jobDetail.setName(getJobName());
    jobDetail.setGroup(getJobGroup());
    jobDetail.setJobDataMap(jobDataMap);
    jobDetail.setJobClass(JobDefinition.class);
    return jobDetail;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:18,代码来源:AbstractScheduledAction.java

示例3: selectJobForTrigger

import org.quartz.JobDetail; //导入方法依赖的package包/类
/**
 * <p>
 * Select the job to which the trigger is associated.
 * </p>
 * 
 * @param conn
 *          the DB Connection
 * @param triggerName
 *          the name of the trigger
 * @param groupName
 *          the group containing the trigger
 * @return the <code>{@link org.quartz.JobDetail}</code> object
 *         associated with the given trigger
 * @throws SQLException
 * @throws ClassNotFoundException
 */
public JobDetail selectJobForTrigger(Connection conn, String triggerName,
        String groupName, ClassLoadHelper loadHelper) throws ClassNotFoundException, SQLException {
    PreparedStatement ps = null;
    ResultSet rs = null;

    try {
        ps = conn.prepareStatement(rtp(SELECT_JOB_FOR_TRIGGER));
        ps.setString(1, triggerName);
        ps.setString(2, groupName);
        rs = ps.executeQuery();

        if (rs.next()) {
            JobDetail job = new JobDetail();
            job.setName(rs.getString(1));
            job.setGroup(rs.getString(2));
            job.setDurability(getBoolean(rs, 3));
            job.setJobClass(loadHelper.loadClass(rs
                    .getString(4)));
            job.setRequestsRecovery(getBoolean(rs, 5));
            
            return job;
        } else {
            if (logger.isDebugEnabled()) {
                logger.debug("No job for trigger '" + groupName + "."
                        + triggerName + "'.");
            }
            return null;
        }
    } finally {
        closeResultSet(rs);
        closeStatement(ps);
    }
}
 
开发者ID:AsuraTeam,项目名称:asura,代码行数:50,代码来源:StdJDBCDelegate.java

示例4: makeJobDetail

import org.quartz.JobDetail; //导入方法依赖的package包/类
/**
 * Helper method to create job detail
 */
public static JobDetail makeJobDetail(final int buildID, final Class jobClass) {
  final JobDetail jobDetail = new JobDetail();
  jobDetail.setJobClass(jobClass);
  jobDetail.setGroup(makeGroupName(buildID));
  jobDetail.setRequestsRecovery(false);
  jobDetail.setDurability(false);
  jobDetail.setVolatility(true);
  return jobDetail;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:13,代码来源:RepeatableScheduler.java


注:本文中的org.quartz.JobDetail.setGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。