}
if (target == null)
{
if (log.isDebugEnabled())
log.debug("GET_STATE: first member (no state)");
passUp(new Event(Event.GET_STATE_OK, new StateTransferInfo()));
}
else
{
boolean successfulFlush = false;
if(use_flush) {
successfulFlush = startFlush(flush_timeout, 5);
}
if (successfulFlush)
{
log.debug("Successful flush at " + local_addr);
}
Message state_req = new Message(target, null, null);
state_req.putHeader(NAME, new StateHeader(StateHeader.STATE_REQ, local_addr, info.state_id));
String stateRequested = info.state_id==null?"full":info.state_id;
if (log.isDebugEnabled())
log.debug("Member " + local_addr + " asking " + target + " for " + stateRequested + " state");
// suspend sending and handling of mesage garbage collection gossip messages,
// fixes bugs #943480 and #938584). Wake up when state has been received
if (log.isTraceEnabled())
log.trace("passing down a SUSPEND_STABLE event");
passDown(new Event(Event.SUSPEND_STABLE, new Long(info.timeout)));
passDown(new Event(Event.MSG, state_req));
}
return; // don't pass down any further !
case Event.STATE_TRANSFER_INPUTSTREAM_CLOSED :
if (use_flush)
{
stopFlush();
}
if (log.isTraceEnabled())
log.trace("STATE_TRANSFER_INPUTSTREAM_CLOSED received");
//resume sending and handling of message garbage collection gossip messages,
// fixes bugs #943480 and #938584). Wakes up a previously suspended message garbage
// collection protocol (e.g. STABLE)
if (log.isTraceEnabled())
log.trace("passing down a RESUME_STABLE event");
passDown(new Event(Event.RESUME_STABLE));
return;
case Event.SUSPEND_OK :
if (use_flush)
{
flush_promise.setResult(Boolean.TRUE);