Example usage for org.springframework.batch.integration.partition MessageChannelPartitionHandler setJobExplorer

List of usage examples for org.springframework.batch.integration.partition MessageChannelPartitionHandler setJobExplorer

Introduction

In this page you can find the example usage for org.springframework.batch.integration.partition MessageChannelPartitionHandler setJobExplorer.

Prototype

public void setJobExplorer(JobExplorer jobExplorer) 

Source Link

Document

org.springframework.batch.core.explore.JobExplorer to use to query the job repository.

Usage

From source file:io.spring.batch.configuration.JobConfiguration.java

@Bean
public PartitionHandler partitionHandler() throws Exception {
    MessageChannelPartitionHandler partitionHandler = new MessageChannelPartitionHandler();

    partitionHandler.setStepName("slaveStep");
    partitionHandler.setGridSize(GRID_SIZE);
    partitionHandler.setMessagingOperations(messageTemplate());
    partitionHandler.setPollInterval(5000l);
    partitionHandler.setJobExplorer(this.jobExplorer);

    partitionHandler.afterPropertiesSet();

    return partitionHandler;
}