// Add this fqn to the set of those we are activating
// so calls to _getState for the fqn can return quickly
activationChangeNodes.add(fqn);
BuddyManager buddyManager = cache.getBuddyManager();
// Request partial state from the cluster and integrate it
if (buddyManager == null)
{
// Get the state from any node that has it and put it
// in the main cache
if (subtreeRoot == null)
{
// We'll update this node with the state we receive
// need to obtain all necessary locks.
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
subtreeRoot = cache.getRoot().addChild(fqn);
cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
}
List<Address> members = cache.getMembers();
// Don't bother trying to fetch state if we are in LOCAL mode
if (members != null && !members.isEmpty())
rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
}
else if (!buddyFqnTransformer.isBackupFqn(fqn))
{
// Get the state from each DataOwner and integrate in their
// respective buddy backup cache
List<Address> buddies = buddyManager.getBackupDataOwners();
for (Address buddy : buddies)
{
List<Address> sources = new ArrayList<Address>(1);
if (!cache.getMembers().contains(buddy))
continue;