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
ConstructorsConstructorDescriptionChunkTaskExecutorItemWriter(org.springframework.batch.core.step.item.ChunkProcessor<T> chunkRequestProcessor, org.springframework.core.task.TaskExecutor taskExecutor) Create a newChunkTaskExecutorItemWriter. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.batch.core.ExitStatusafterStep(org.springframework.batch.core.step.StepExecution stepExecution) voidbeforeStep(org.springframework.batch.core.step.StepExecution stepExecution) void
-
Constructor Details
-
ChunkTaskExecutorItemWriter
public ChunkTaskExecutorItemWriter(org.springframework.batch.core.step.item.ChunkProcessor<T> chunkRequestProcessor, org.springframework.core.task.TaskExecutor taskExecutor) Create a newChunkTaskExecutorItemWriter.- Parameters:
chunkRequestProcessor- the chunk processor to process chunkstaskExecutor- the task executor to submit chunk processing tasks to
-
-
Method Details
-
write
-
beforeStep
public void beforeStep(org.springframework.batch.core.step.StepExecution stepExecution) - Specified by:
beforeStepin interfaceorg.springframework.batch.core.listener.StepExecutionListener
-
afterStep
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.step.StepExecution stepExecution) - Specified by:
afterStepin interfaceorg.springframework.batch.core.listener.StepExecutionListener
-