public final class PartitioningStrategyFactory extends Object
PartitioningStrategy
instances.Constructor and Description |
---|
PartitioningStrategyFactory(ClassLoader configClassLoader)
Construct a new PartitioningStrategyFactory
|
Modifier and Type | Method and Description |
---|---|
PartitioningStrategy |
getPartitioningStrategy(String mapName,
PartitioningStrategyConfig config)
|
void |
removePartitioningStrategyFromCache(String mapName)
Remove the cached
PartitioningStrategy from the internal cache, if it exists. |
public PartitioningStrategyFactory(ClassLoader configClassLoader)
configClassLoader
- the current NodeEngine
's configClassLoader
.public PartitioningStrategy getPartitioningStrategy(String mapName, PartitioningStrategyConfig config)
PartitioningStrategy
for the given NodeEngine
and mapName
. This method
first attempts locating a PartitioningStrategy
in {code config.getPartitioningStrategy()}. If this is null
,
then looks up its internal cache of partitioning strategies; if one has already been created for the given
mapName
, it is returned, otherwise it is instantiated, cached and returned.mapName
- Map for which this partitioning strategy is being createdconfig
- the partitioning strategy configurationpublic void removePartitioningStrategyFromCache(String mapName)
PartitioningStrategy
from the internal cache, if it exists.mapName
- name of the map whose partitioning strategy will be removed from internal cacheCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.