public class MultiResourcePartitioner extends 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 |
---|---|
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(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(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 returnPartitioner.partition(int)
Copyright © 2014 Pivotal. All rights reserved.