public class ColumnRangePartitioner
extends java.lang.Object
implements org.springframework.batch.core.partition.support.Partitioner
Constructor and Description |
---|
ColumnRangePartitioner() |
Modifier and Type | Method and Description |
---|---|
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 |
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 |
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 void setDataSource(javax.sql.DataSource dataSource)
dataSource
- a DataSource
public 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 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.Partitioner
Partitioner.partition(int)