public class IncrementalColumnRangePartitioner
extends java.lang.Object
implements org.springframework.batch.core.partition.support.Partitioner, org.springframework.batch.core.StepExecutionListener, org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BATCH_INCREMENTAL_MAX_ID |
| Constructor and Description |
|---|
IncrementalColumnRangePartitioner() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.springframework.batch.core.ExitStatus |
afterStep(org.springframework.batch.core.StepExecution stepExecution) |
void |
beforeStep(org.springframework.batch.core.StepExecution stepExecution) |
java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> |
partition(int gridSize)
Partition a database table assuming that the data in the column specified
are uniformly distributed.
|
void |
setCheckColumn(java.lang.String checkColumn) |
void |
setColumn(java.lang.String column)
The name of the column to partition.
|
void |
setDataSource(javax.sql.DataSource dataSource)
The data source for connecting to the database.
|
void |
setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer) |
void |
setOverrideValue(java.lang.Long overrideValue) |
void |
setPartitions(int partitions)
The number of partitions to create.
|
void |
setTable(java.lang.String table)
The name of the SQL table the data are in.
|
public static final java.lang.String BATCH_INCREMENTAL_MAX_ID
public void setDataSource(javax.sql.DataSource dataSource)
dataSource - a DataSourcepublic void setTable(java.lang.String table)
table - the name of the tablepublic void setColumn(java.lang.String column)
column - the column name.public void setPartitions(int partitions)
partitions - the number of partitions.public void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
public void setCheckColumn(java.lang.String checkColumn)
public void setOverrideValue(java.lang.Long overrideValue)
public java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> partition(int gridSize)
minValue and maxValue specifying the range of
values to consider in each partition.partition in interface org.springframework.batch.core.partition.support.PartitionerPartitioner.partition(int)public void beforeStep(org.springframework.batch.core.StepExecution stepExecution)
beforeStep in interface org.springframework.batch.core.StepExecutionListenerpublic org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution)
afterStep in interface org.springframework.batch.core.StepExecutionListenerpublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception