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

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

Introduction

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

Prototype

MessageChannelPartitionHandler

Source Link

Usage

From source file:com.apress.prospringintegration.springbatch.partition.PartitionConfiguration.java

@Bean
public MessageChannelPartitionHandler partitionHandler() {
    MessageChannelPartitionHandler partitionHandler = new MessageChannelPartitionHandler();
    partitionHandler.setMessagingOperations(messagingTemplate());
    partitionHandler.setReplyChannel(pollableChannel);
    partitionHandler.setStepName("step1");
    partitionHandler.setGridSize(10);//from ww w . j  av  a  2s.  c om
    return partitionHandler;
}

From source file:uk.ac.kcl.batch.RemoteConfiguration.java

@Bean
@Qualifier("partitionHandler")
public MessageChannelPartitionHandler partitionHandler(@Qualifier("requestChannel") MessageChannel reqChannel,
        @Qualifier("aggregatedReplyChannel") PollableChannel repChannel) {
    MessageChannelPartitionHandler handler = new MessageChannelPartitionHandler();
    handler.setGridSize(gridSize);/* w ww.ja  v a 2s. com*/
    handler.setStepName("compositeSlaveStep");
    handler.setReplyChannel(repChannel);
    MessagingTemplate template = new MessagingTemplate();
    template.setDefaultChannel(reqChannel);
    template.setReceiveTimeout(partitionHandlerTimeout);
    handler.setMessagingOperations(template);
    return handler;
}

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