Skip to content

Commit 08c4cb1

Browse files
committed
Move core partitioning APIs under org.springframework.batch.core.partition
Resolves #4849
1 parent 9eafb31 commit 08c4cb1

File tree

24 files changed

+54
-39
lines changed

24 files changed

+54
-39
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
import org.springframework.batch.core.job.flow.Flow;
3636
import org.springframework.batch.core.launch.JobLauncher;
3737
import org.springframework.batch.core.partition.PartitionHandler;
38-
import org.springframework.batch.core.partition.support.Partitioner;
39-
import org.springframework.batch.core.partition.support.StepExecutionAggregator;
38+
import org.springframework.batch.core.partition.Partitioner;
39+
import org.springframework.batch.core.partition.StepExecutionAggregator;
4040
import org.springframework.batch.core.repository.JobRepository;
4141
import org.springframework.batch.core.step.AbstractStep;
4242
import org.springframework.batch.core.step.builder.AbstractTaskletStepBuilder;
@@ -61,7 +61,6 @@
6161
import org.springframework.batch.item.ItemWriter;
6262
import org.springframework.batch.repeat.CompletionPolicy;
6363
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
64-
import org.springframework.batch.repeat.support.TaskExecutorRepeatTemplate;
6564
import org.springframework.beans.factory.BeanNameAware;
6665
import org.springframework.beans.factory.FactoryBean;
6766
import org.springframework.classify.BinaryExceptionClassifier;
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2009 the original author or authors.
2+
* Copyright 2006-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.batch.core.partition.support;
17+
package org.springframework.batch.core.partition;
18+
19+
import org.springframework.batch.core.partition.support.SimplePartitioner;
1820

1921
import java.util.Collection;
2022

@@ -33,6 +35,7 @@
3335
* </p>
3436
*
3537
* @author Dave Syer
38+
* @author Mahmoud Ben Hassine
3639
* @since 2.1.3
3740
*
3841
*/
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,14 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.batch.core.partition.support;
17+
package org.springframework.batch.core.partition;
1818

1919
import org.springframework.batch.core.BatchStatus;
2020
import org.springframework.batch.core.JobExecutionException;
2121
import org.springframework.batch.core.Step;
2222
import org.springframework.batch.core.StepExecution;
23-
import org.springframework.batch.core.partition.PartitionHandler;
24-
import org.springframework.batch.core.partition.StepExecutionSplitter;
23+
import org.springframework.batch.core.partition.support.DefaultStepExecutionAggregator;
2524
import org.springframework.batch.core.step.AbstractStep;
2625
import org.springframework.batch.item.ExecutionContext;
2726
import org.springframework.util.Assert;
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.batch.core.partition.support;
17+
package org.springframework.batch.core.partition;
1818

1919
import java.util.Map;
2020

@@ -28,6 +28,7 @@
2828
*
2929
* @author Dave Syer
3030
* @author Taeik Lim
31+
* @author Mahmoud Ben Hassine
3132
* @since 2.0
3233
*/
3334
@FunctionalInterface
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008-2022 the original author or authors.
2+
* Copyright 2008-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,18 +13,19 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.batch.core.partition.support;
16+
package org.springframework.batch.core.partition;
1717

1818
import java.util.Collection;
1919

2020
import org.springframework.batch.core.StepExecution;
2121

2222
/**
23-
* Strategy for a aggregating step executions, usually when they are the result of
23+
* Strategy for aggregating step executions, usually when they are the result of
2424
* partitioned or remote execution.
2525
*
2626
* @author Dave Syer
2727
* @author Taeik Lim
28+
* @author Mahmoud Ben Hassine
2829
* @since 2.1
2930
*
3031
*/

spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/DefaultStepExecutionAggregator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import org.springframework.batch.core.BatchStatus;
2020
import org.springframework.batch.core.ExitStatus;
2121
import org.springframework.batch.core.StepExecution;
22+
import org.springframework.batch.core.partition.StepExecutionAggregator;
2223
import org.springframework.util.Assert;
2324

2425
import java.util.Collection;

spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/MultiResourcePartitioner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.HashMap;
2121
import java.util.Map;
2222

23+
import org.springframework.batch.core.partition.Partitioner;
2324
import org.springframework.batch.item.ExecutionContext;
2425
import org.springframework.core.io.Resource;
2526
import org.springframework.util.Assert;

spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/RemoteStepExecutionAggregator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import org.springframework.batch.core.JobExecution;
2525
import org.springframework.batch.core.StepExecution;
26+
import org.springframework.batch.core.partition.StepExecutionAggregator;
2627
import org.springframework.batch.core.repository.explore.JobExplorer;
2728
import org.springframework.beans.factory.InitializingBean;
2829
import org.springframework.util.Assert;

spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimplePartitioner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.HashMap;
2020
import java.util.Map;
2121

22+
import org.springframework.batch.core.partition.Partitioner;
2223
import org.springframework.batch.item.ExecutionContext;
2324

2425
/**

spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import org.springframework.batch.core.JobInstance;
3030
import org.springframework.batch.core.Step;
3131
import org.springframework.batch.core.StepExecution;
32+
import org.springframework.batch.core.partition.PartitionNameProvider;
33+
import org.springframework.batch.core.partition.Partitioner;
3234
import org.springframework.batch.core.partition.StepExecutionSplitter;
3335
import org.springframework.batch.core.repository.JobRepository;
3436
import org.springframework.batch.item.ExecutionContext;

0 commit comments

Comments
 (0)