Class ChunkTaskExecutorItemWriter<T>

java.lang.Object
org.springframework.batch.integration.chunk.ChunkTaskExecutorItemWriter<T>
Type Parameters:
T - type of items
All Implemented Interfaces:
org.springframework.batch.core.listener.StepExecutionListener, org.springframework.batch.core.listener.StepListener, org.springframework.batch.infrastructure.item.ItemWriter<T>

public class ChunkTaskExecutorItemWriter<T> extends Object implements org.springframework.batch.infrastructure.item.ItemWriter<T>, org.springframework.batch.core.listener.StepExecutionListener
Similar to ChunkMessageChannelItemWriter, this item writer submits chunk requests to local workers from a TaskExecutor instead of sending them over a message channel to remote workers.
Since:
6.0
Author:
Mahmoud Ben Hassine
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChunkTaskExecutorItemWriter(org.springframework.batch.core.step.item.ChunkProcessor<T> chunkRequestProcessor, org.springframework.core.task.TaskExecutor taskExecutor)
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.batch.core.ExitStatus
    afterStep(org.springframework.batch.core.step.StepExecution stepExecution)
     
    void
    beforeStep(org.springframework.batch.core.step.StepExecution stepExecution)
     
    void
    write(org.springframework.batch.infrastructure.item.Chunk<? extends T> chunk)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ChunkTaskExecutorItemWriter

      public ChunkTaskExecutorItemWriter(org.springframework.batch.core.step.item.ChunkProcessor<T> chunkRequestProcessor, org.springframework.core.task.TaskExecutor taskExecutor)
      Parameters:
      chunkRequestProcessor - the chunk processor to process chunks
      taskExecutor - the task executor to submit chunk processing tasks to
  • Method Details

    • write

      public void write(org.springframework.batch.infrastructure.item.Chunk<? extends T> chunk)
      Specified by:
      write in interface org.springframework.batch.infrastructure.item.ItemWriter<T>
    • beforeStep

      public void beforeStep(org.springframework.batch.core.step.StepExecution stepExecution)
      Specified by:
      beforeStep in interface org.springframework.batch.core.listener.StepExecutionListener
    • afterStep

      public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.step.StepExecution stepExecution)
      Specified by:
      afterStep in interface org.springframework.batch.core.listener.StepExecutionListener