當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。