|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.partition.support.MultiResourcePartitioner
public class MultiResourcePartitioner
Implementation of Partitioner
that locates multiple resources and
associates their file names with execution context keys. Creates an
ExecutionContext
per resource, and labels them as
{partition0, partition1, ..., partitionN}
. The grid size is
ignored.
Constructor Summary | |
---|---|
MultiResourcePartitioner()
|
Method Summary | |
---|---|
Map<String,ExecutionContext> |
partition(int gridSize)
Assign the filename of each of the injected resources to an ExecutionContext . |
void |
setKeyName(String keyName)
The name of the key for the file name in each ExecutionContext . |
void |
setResources(Resource[] resources)
The resources to assign to each partition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiResourcePartitioner()
Method Detail |
---|
public void setResources(Resource[] resources)
resources
- the resources to usepublic void setKeyName(String keyName)
ExecutionContext
.
Defaults to "fileName".
keyName
- the value of the keypublic Map<String,ExecutionContext> partition(int gridSize)
ExecutionContext
.
partition
in interface Partitioner
gridSize
- the size of the map to return
Partitioner.partition(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |