public class GridExternalAffinityFunction extends Object implements CacheAffinityFunction
GridCacheModuloAffinity The
partition selection is as follows: 0 maps to partition 1 and any other value maps to partition 1.| Modifier and Type | Field and Description |
|---|---|
static String |
IDX_ATTR
Node attribute for index.
|
| Constructor and Description |
|---|
GridExternalAffinityFunction()
Empty constructor.
|
GridExternalAffinityFunction(int parts,
int backups) |
| Modifier and Type | Method and Description |
|---|---|
List<List<ClusterNode>> |
assignPartitions(CacheAffinityFunctionContext ctx) |
Collection<ClusterNode> |
nodes(int part,
Collection<ClusterNode> nodes) |
int |
partition(Object key) |
int |
partitions() |
void |
removeNode(UUID nodeId) |
void |
reset() |
String |
toString() |
public static final String IDX_ATTR
public GridExternalAffinityFunction()
new GridCacheModuloAffinity(2, 0).public GridExternalAffinityFunction(int parts,
int backups)
parts - Number of partitions.backups - Number of backups.public List<List<ClusterNode>> assignPartitions(CacheAffinityFunctionContext ctx)
assignPartitions in interface CacheAffinityFunctionpublic Collection<ClusterNode> nodes(int part, Collection<ClusterNode> nodes)
public void reset()
reset in interface CacheAffinityFunctionpublic int partitions()
partitions in interface CacheAffinityFunctionpublic int partition(Object key)
partition in interface CacheAffinityFunctionpublic void removeNode(UUID nodeId)
removeNode in interface CacheAffinityFunctionnodeId -
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015