Example usage for org.springframework.batch.core.configuration JobRegistry unregister

List of usage examples for org.springframework.batch.core.configuration JobRegistry unregister

Introduction

In this page you can find the example usage for org.springframework.batch.core.configuration JobRegistry unregister.

Prototype

void unregister(String jobName);

Source Link

Document

Unregisters a previously registered Job .

Usage

From source file:org.springframework.data.hadoop.admin.util.HadoopWorkflowUtils.java

/**
 * unregister spring batch job.//from www .  j a  va  2s  .  c  o m
 * 
 * @param context root application context
 * @param springBatchJobName job name to be unregistered
 */
public static void unregisterSpringBatchJob(ApplicationContext context, String springBatchJobName) {
    JobRegistry jobRegistry = context.getBean("jobRegistry", JobRegistry.class);
    jobRegistry.unregister(springBatchJobName);
    logger.info("unregister spring batch job:" + springBatchJobName);
}