continuation.setEndPoint(this); _selectSet.scheduleTimeout(continuation,timeout); _selectSet.wakeup();
_pending=true;  if (continuation.isPending() && (continuation.isExpired() || continuation._resumed)) redispatch(); else { _selectSet.scheduleTimeout(continuation,timeout); _selectSet.wakeup(); }
        public void run()        {            try            {                _connection.handle();            }            catch (ClosedChannelException e)            {                Log.ignore(e);            }            catch (EofException e)            {                Log.debug("EOF", e);                try{close();}                catch(IOException e2){Log.ignore(e2);}            }            catch (HttpException e)            {                Log.debug("BAD", e);                try{close();}                catch(IOException e2){Log.ignore(e2);}            }            catch (Throwable e)            {                Log.warn("handle failed", e);                try{close();}                catch(IOException e2){Log.ignore(e2);}            }            finally            {                synchronized (this)                {                    RetryContinuation continuation = (RetryContinuation) _connection.getRequest().getContinuation();                    if (continuation != null && continuation.isPending())                    {                        // We have a continuation                        Log.debug("continuation {}", continuation);                        long timeout = continuation.getTimeout();                        continuation.setEndPoint(this);                        _selectSet.scheduleTimeout(continuation,timeout);                        _selectSet.wakeup();                    }                    else                         undispatch();                }            }        }