You can use PartitionRegionHelper.getLocalPrimaryData. It returns a region that contains only those entries that are located in the local primary buckets. I sometimes also use PartitionRegionHelper.getPrimaryMemberForKey for the same purpose, and then check if the returned member is this member.
↧