case Event.MSG:
// JGRP-465. We only deal with msgs to avoid having to use a concurrent collection; ignore views,
// suspicions, etc which can come up on unusual threads.
Message msg=(Message)evt.getArg();
if(msg.isFlagSet(Message.NO_FC))
break;
FcHeader hdr=(FcHeader)msg.getHeader(this.id);
if(hdr != null) {
switch(hdr.type) {
case FcHeader.REPLENISH:
num_credit_responses_received++;
handleCredit(msg.getSrc(), (Number)msg.getObject());
break;
case FcHeader.CREDIT_REQUEST:
num_credit_requests_received++;
Address sender=msg.getSrc();
Long sent_credits=(Long)msg.getObject();
if(sent_credits != null)
handleCreditRequest(received, sender, sent_credits.longValue());
break;
default:
log.error("header type " + hdr.type + " not known");
break;
}
return null; // don't pass message up
}
Address sender=msg.getSrc();
long new_credits=adjustCredit(received, sender, msg.getLength());
// JGRP-928: changed ignore_thread to a ThreadLocal: multiple threads can access it with the
// introduction of the concurrent stack
if(ignore_synchronous_response)
ignore_thread.set(true);