public class MultiResourcePartitioner extends java.lang.Object implements Partitioner
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 and Description |
|---|
MultiResourcePartitioner() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,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.
|
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,ExecutionContext> partition(int gridSize)
ExecutionContext.partition in interface PartitionergridSize - the size of the map to returnPartitioner.partition(int)