Interface PartitionNameProvider
public interface PartitionNameProvider
Optional interface for
Partitioner
implementations that need to use a custom naming scheme for partitions. It is not necessary to implement this interface if a partitioner extendsSimplePartitioner
and re-uses the default partition names.If a partitioner does implement this interface, however, on a restart the
Partitioner.partition(int)
method will not be called again, instead the partitions will be re-used from the last execution, and matched by name with the results ofgetPartitionNames(int)
. This can be a useful performance optimisation if the partitioning process is expensive.- Since:
- 2.1.3
- Author:
- Dave Syer
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<java.lang.String>
getPartitionNames(int gridSize)