-
1. Re: Grouping API
rvansa Feb 21, 2018 9:45 AM (in response to kngkarthi7395)Hi,
Grouping API is not designed to locate group of entries onto *a specific node* but just *together*. If you want to address specific node, you need to use Key Affinity service (btw. you could probably use the key from this service as the group name). Regrettably if the topology changes (node joins/leaves) the record may be moved to another node. When the node re-joins, there's no guarantee that it will be relocated back; the algorithm will try to minimalize number of moved data.
If you want to keep very fast access to the entry, you can let it move to the last node that wrote under that key: instead of distributed mode use scattered mode and enable biasing
@Group annotation is used in the class you use for keys; simply annotate one String-returning method and the result will be used to compute key's segment, therefore co-locating keys with the same group.