|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 | |
|---|---|
java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> |
partition(int gridSize)
Assign the filename of each of the injected resources to an ExecutionContext. |
void |
setKeyName(java.lang.String keyName)
The name of the key for the file name in each ExecutionContext. |
void |
setResources(org.springframework.core.io.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(org.springframework.core.io.Resource[] resources)
resources - the resources to usepublic void setKeyName(java.lang.String keyName)
ExecutionContext.
Defaults to "fileName".
keyName - the value of the keypublic java.util.Map<java.lang.String,org.springframework.batch.item.ExecutionContext> partition(int gridSize)
ExecutionContext.
partition in interface PartitionergridSize - 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 | |||||||||