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

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

Introduction

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

Prototype

public void setPollInterval(long pollInterval) 

Source Link

Document

How often to poll the job repository for the status of the workers.

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;
}