waiting_for_state_response = true; start = System.currentTimeMillis();
waiting_for_state_response = true;
   public void down(Event evt)   {      Address target;      StateTransferInfo info;      switch (evt.getType())      {         case Event.TMP_VIEW :         case Event.VIEW_CHANGE :            handleViewChange((View) evt.getArg());            break;         case Event.GET_STATE :            info = (StateTransferInfo) evt.getArg();            if (info.target == null)            {               target = determineCoordinator();            }            else            {               target = info.target;               if (target.equals(local_addr))               {                  if (log.isErrorEnabled())                     log.error("GET_STATE: cannot fetch state from myself !");                  target = null;               }            }            if (target == null)            {               if (log.isDebugEnabled())                  log.debug("GET_STATE: first member (no state)");               passUp(new Event(Event.GET_STATE_OK, new StateTransferInfo()));            }            else            {               if (use_flush)               {                  startFlush(flush_timeout);               }               Message state_req = new Message(target, null, null);               state_req.putHeader(NAME, new StateHeader(StateHeader.STATE_REQ, local_addr, info.state_id));               if (log.isDebugEnabled())                  log.debug("GET_STATE: asking " + target + " for 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.isDebugEnabled())                  log.debug("passing down a SUSPEND_STABLE event");               passDown(new Event(Event.SUSPEND_STABLE, new Long(info.timeout)));               waiting_for_state_response = true;               start = System.currentTimeMillis();               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.isDebugEnabled())               log.debug("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.isDebugEnabled())               log.debug("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);            }            break;         case Event.CONFIG :            Map config = (Map) evt.getArg();                       if(config != null && config.containsKey("flush_timeout"))            {               Long ftimeout = (Long) config.get("flush_timeout");               use_flush = true;                            flush_timeout = ftimeout.longValue();                                         }            break;                     }      passDown(evt); // pass on to the layer below us   }