private synchronized void handleSendRequest(boolean synchronous, Message message) {
// this method is synchronized to avoid concurrency problems between sending a message and registering a new location
assert !synchronous: "We should not be sending synchronous requests from the coordinator";
Location dst = message.destination();
if (dst.isLogicalOnly()) {
if (!maxPhysicalIds.containsKey(dst)) {
initLLState(dst.asLogical()); // first time we're seeing this logical location, so initialize some state for it
}
// send to all currently registered physical instances of the logical destination
for (int physId = 0; physId <= maxPhysicalIds.get(dst); physId++) {
senderReceiver.sendAsync(message, new PhysicalLocation((LogicalLocation)dst, physId));