}
msg = (MapMessage)resp[0].getMessage();
msg.deserialize(getExternalLoaders());
backup = entry.getBackupNodes();
if (entry.getValue() instanceof ReplicatedMapEntry) {
ReplicatedMapEntry val = (ReplicatedMapEntry)entry.getValue();
val.setOwner(getMapOwner());
}
if (msg.getValue() != null)
entry.setValue(msg.getValue());
}
if (entry.isBackup()) {
//select a new backup node
backup = publishEntryInfo(key, entry.getValue());
} else if (entry.isProxy()) {
//invalidate the previous primary
msg =
new MapMessage(getMapContextName(), MapMessage.MSG_PROXY, false, (Serializable)key, null, null,
channel.getLocalMember(false), backup);
Member[] dest = getMapMembersExcl(backup);
if (dest != null && dest.length > 0) {
getChannel().send(dest, msg, getChannelSendOptions());
}
}
entry.setPrimary(channel.getLocalMember(false));
entry.setBackupNodes(backup);
entry.setBackup(false);
entry.setProxy(false);
} catch (Exception x) {
log.error("Unable to replicate out data for a LazyReplicatedMap.get operation", x);
return null;
}
}
if (log.isTraceEnabled())
log.trace("Requesting id:" + key + " result:" + entry.getValue());
if (entry.getValue() != null && entry.getValue() instanceof ReplicatedMapEntry) {
ReplicatedMapEntry val = (ReplicatedMapEntry)entry.getValue();
//hack, somehow this is not being set above
val.setOwner(getMapOwner());
}
return entry.getValue();
}