public class GridExternalAffinityFunction extends Object implements AffinityFunction
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(AffinityFunctionContext ctx) |
Collection<ClusterNode> |
nodes(int part,
Collection<ClusterNode> nodes)
Assigns nodes to one partition.
|
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(AffinityFunctionContext ctx)
assignPartitions in interface AffinityFunctionpublic Collection<ClusterNode> nodes(int part, Collection<ClusterNode> nodes)
part - Partition to assign nodes for.nodes - Cache topology nodes.public void reset()
reset in interface AffinityFunctionpublic int partitions()
partitions in interface AffinityFunctionpublic int partition(Object key)
partition in interface AffinityFunctionpublic void removeNode(UUID nodeId)
removeNode in interface AffinityFunctionnodeId -
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.0-b1 Release Date : December 1 2015