Currently there is no way for external code to find out any information about how the cache participates in buddy relationships.
Two issues (probably should be subtasks):
1) BuddyManager exposes getBuddyAddresses() but that only provides info about the group for which the node is data owner, not for any groups the node participates in as a buddy. Also, it returns an internal data structure, making it unsafe to expose to random code.
Because of this, if a "primary buddy" wanted to gravitate some or all data upon exit of the data owner, it would have no way to know if it is primary. Having all buddies gravitate data would be "a bad thing".
1) In 2.0.0 I believe the BuddyManager is not available except through CacheSPI. Perhaps some info about buddy group membership could be exposed via RuntimeConfig.