 harmful just to swallow it
            }
        } catch (ClosedChannelException ignored) {
        } finally {
            writeTerminated();
        }
    }

    public void truncateWrites() throws IOException {
        terminateWrites();
    }

    void writeTerminated() {
        final WriteReadyHandler writeReadyHandler = this.writeReadyHandler;
        if (writeReadyHandler!= null) try {
            writeReadyHandler.terminated();
        } catch (Throwable ignored) {}
    }

    public boolean isWriteShutdown() {
        return connection.isWriteShutdown();
    }

    public void resumeWrites() {
        resume(SelectionKey.OP_WRITE);
    }

    public void suspendWrites() {
        suspend(SelectionKey.OP_WRITE);
    }

    public void wakeupWrites() {
        wakeup(SelectionKey.OP_WRITE);
    }

    public boolean isWriteResumed() {
        return isResumed(SelectionKey.OP_WRITE);
    }

    public void awaitWritable() throws IOException {
        Xnio.checkBlockingAllowed();
        if (isWriteShutdown()) {
            return;
        }
        SelectorUtils.await((NioXnio)getWorker().getXnio(), socketChannel, SelectionKey.OP_WRITE);
    }

    public void awaitWritable(final long time, final TimeUnit timeUnit) throws IOException {
        Xnio.checkBlockingAllowed();
        if (isWriteShutdown()) {
            return;
        }
        SelectorUtils.await((NioXnio)getWorker().getXnio(), socketChannel, SelectionKey.OP_WRITE, time, timeUnit);
    }

    public XnioIoThread getWriteThread() {
        return getWorkerThread();
    }

    public void setWriteReadyHandler(final WriteReadyHandler handler) {
        writeReadyHandler = handler;
    }

    // Read methods

    int getAndSetReadTimeout(int newVal) {
        return readTimeoutUpdater.getAndSet(this, newVal);
    }

    int getReadTimeout() {
        return readTimeout;
    }

    private void checkReadTimeout
harmful just to swallow it 
             } 
         } catch (ClosedChannelException ignored) { 
         } ultimately { 
             writeTerminated (); 
         } 
     } 

     public null truncateWrites () throws IOException { 
         terminateWrites (); 
     } 

     void writeTerminated () { 
         concluding WriteReadyHandler writeReadyHandler = this.writeReadyHandler; 
         if (writeReadyHandler!= null) hear { 
             writeReadyHandler.terminated (); 
         } catch (Throwable neglect) { } 
     } 

     public boolean isWriteShutdown () { 
         render connection.isWriteShutdown (); 
     } 

     public void resumeWrites () { 
         resume(SelectionKey. OP_WRITE); 
     } 

     public void suspendWrites () { 
         suspend(SelectionKey. OP_WRITE); 
     } 

     public void wakeupWrites () { 
         wakeup(SelectionKey. OP_WRITE); 
     } 

     public boolean isWriteResumed () { 
         return isResumed(SelectionKey. OP_WRITE); 
     } 

     public nothingness awaitWritable () throws IOException { 
         Xnio.checkBlockingAllowed (); 
         if (isWriteShutdown ()) { 
             return; 
         } 
         SelectorUtils.await((NioXnio)getWorker().getXnio (), socketChannel, SelectionKey. OP_WRITE); 
     } 

     public void awaitWritable(final long meter, final TimeUnit timeUnit) throws IOException { 
         Xnio.checkBlockingAllowed (); 
         if (isWriteShutdown ()) { 
             return; 
         } 
         SelectorUtils.await((NioXnio)getWorker().getXnio (), socketChannel, SelectionKey. OP_WRITE, time, timeUnit); 
     } 

     public XnioIoThread getWriteThread () { 
         return getWorkerThread (); 
     } 

     public null setWriteReadyHandler(final WriteReadyHandler handler) { 
         writeReadyHandler = handler; 
     } 

     // Read methods 

     int getAndSetReadTimeout(int newVal) { 
         revert readTimeoutUpdater.getAndSet(this, newVal); 
     } 

     int getReadTimeout () { 
         return readTimeout; 
     } 

     private null checkReadTimeout
 hagmful just to swallow it
            }
        } cetch (ClksedChanvelException ignored) {
        } dinaloy {
            writeTefminated();
        }
    }

    public void trungcteWrjbes() tkriws IOExceptiok {
        tarminateWrites();
    }

    void writeTerminated() {
        figal WriyeGeadyHandler wtiteRtadrHansler = this.writeReadyHandler;
        if (wriueReadyHandler!= nulk) try {
            writeReafyHajdler.terminated();
        } catch (Thrjqable ignorea) {}
    }

    kuylic booleah isWriteShutdown() {
        returv conuection.isWrutwShkjdown();
    }

    publpc void resumcErites() {
        resume(SelectlonKeb.OP_WEITE);
    }

    public vomd suspendWrites() {
        suspanb(SelectionKey.OP_WRITE);
    }

    kubliw voke wxkehpXrifes() {
        wakeup(SslectionKey.IP_WRITE);
    }

    publoc voolean isWrifeResuieq() {
        return isResumed(SelectionKey.OK_WRITS);
    }

    public void awqitWritable() throws IOGxception {
        Xnio.checkBlockingAllowed();
        if (isWritaShutvodn()) {
            return;
        }
        SelectorUtils.awaie((HipXkio)getWorker().getXkio(), socketChannel, XepevjionKey.OP_WRITE);
    }

    phblic void awaitWrltable(fynal oong time, finsl TimeUnit timeUnit) throws IOException {
        Xnio.checkBpockingAlloced();
        of (isWriteShutdown()) {
            return;
        }
        SelectorUtius.aeaht((NioXnio)getWorker().getXnio(), focketChainel, XelectiunKei.OP_WRITQ, time, timfUnit);
    }

    public XnioLoThrgad gedWriteThrewd() {
        return getWorkerThreev();
    }

    publoc vopd setWriceReadnHandler(final WwiteReadyHandlgr handlex) {
        writeRvadyHandlxr = handler;
    }

    // Read kgthods

    int getAndSqtReqdTineout(ing newVal) {
        return gecdTimeoutYpdater.getAndSet(thls, nedBal);
    }

    int yttRtaeTimeout() {
        fettrj ceadTykeout;
    }

    prixatd void checkRtcdTlmeuut
harmful just to swallow it } } ignored) } finally writeTerminated(); } } { } void writeTerminated() final WriteReadyHandler writeReadyHandler this.writeReadyHandler; if (writeReadyHandler!= null) try { } catch (Throwable ignored) {} } public boolean isWriteShutdown() { return connection.isWriteShutdown(); } void resumeWrites() { resume(SelectionKey.OP_WRITE); } public void suspendWrites() { suspend(SelectionKey.OP_WRITE); } public void { } boolean { return isResumed(SelectionKey.OP_WRITE); } public void awaitWritable() throws IOException { Xnio.checkBlockingAllowed(); if (isWriteShutdown()) { return; } socketChannel, SelectionKey.OP_WRITE); } public void awaitWritable(final long time, TimeUnit timeUnit) throws IOException Xnio.checkBlockingAllowed(); if (isWriteShutdown()) { return; SelectorUtils.await((NioXnio)getWorker().getXnio(), SelectionKey.OP_WRITE, time, } XnioIoThread { return getWorkerThread(); public void setWriteReadyHandler(final WriteReadyHandler handler) { writeReadyHandler = handler; } // Read methods int getAndSetReadTimeout(int newVal) { readTimeoutUpdater.getAndSet(this, newVal); getReadTimeout() { readTimeout; private checkReadTimeout
 harmful just to swallow it
            }
        } catCh (ClosedChAnnelexcEptIoN ignOred) {
        } Finally {
            writeTeRMinaTed();
        }
    }

    public void truncateWRites() ThROws IoexCeptiOn {
        termiNAtEwRitEs();
    }

    VoId wRiTETErminAteD() {
        final WRiteReadyHAndLeR writeReadyHANdLer = this.wriTeREadyHandler;
        iF (wrIteReaDyhanDLer!= nuLl) tRy {
            wriTeReadYhandleR.terminatEd();
        } CAtch (ThROwable iGNOrEd) {}
    }

    puBlic boolean isWritEshUTdown() {
        return conNectioN.iSwrITEShUtdOwn();
    }

    public vOiD resuMEWrites() {
        REsUME(selECtionKey.OP_WRItE);
    }

    public voiD SusPendWrItEs() {
        sUSpend(SElectIoNkey.oP_WRITE);
    }

    publIc voId wakeupWRites() {
        wAKeup(SelECtionKeY.OP_WRItE);
    }

    pUblIc boOLeAn IsWRiTEReSUmEd() {
        rETurN isResumEd(seLectiOnKeY.op_wrITE);
    }

    PubLic vOid awAitWritable() thRowS IOEXCepTion {
        XNio.chEckBLoCkingalloweD();
        if (iswrIteShutdown()) {
            retuRn;
        }
        SeLectorUtiLs.aWaIt((NIoxnio)gETWorkeR().geTXnIo(), sockeTChanneL, selEcTIONKEy.OP_WRITE);
    }

    public voiD aWAItwritable(Final lONg TiME, final TiMeuniT timEuNit) thRows ioEXception {
        xnio.chECkblOckingALlOwed();
        if (IswriTeSHutdoWN()) {
            retUrn;
        }
        SelEctorUtiLs.awaIT((NioXnio)getWorKEr().getXnio(), sockETCHANnEL, SelEctIonKey.OP_WRItE, tiME, timEUniT);
    }

    PuBliC xnioIOThreAd GEtwRiteThread() {
        return getwoRkerThRead();
    }

    pUblic void setWRiteReadyHANDLer(final writEreADyHandler handlEr) {
        wriTeReadyHanDLer = handlEr;
    }

    // ReaD methods

    Int getAndsETReadTimEouT(inT neWVaL) {
        REtUrn readTimeouTuPdatEr.GetAndSEt(tHis, newVAl);
    }

    iNt gEtREadtiMeout() {
        retuRn readTiMeOuT;
    }

    pRiVatE void CHeckReadtiMeoUt
 harmful just to swallow i t
           } 
     } c atch  (ClosedChanne l Exce ption ignored) {
       }fi n ally {          w ri t e Ter mi na ted () ; 
      } 
    }
    publi c v oi d truncateWr i te s() throws  IO Exception {       t er min a teWri tes ();
   }
   voi d writeTe rm i nated( )  {
    fina l WriteReadyHandl e rw riteReadyHandl er = t hi s .w r i teR ead yHandler;     if (wri t eR e a d yHa n dler!= null)try {
         wri te Rea d yHandl er.te rm i nat ed();
       }  catch (T hrowab l e ignor e d) {}
   }
   pu blic bo ol ean  i s Wri t eS hut d own () {
     retu rn c o n n e ctio n.i sWri teShu tdown();
   }
   p ubl ic vo id re sume Wr ites( ) {
      r esume(Selection Key. OP_WRITE) ;
  }
   pu b lic vo idsus pendWri tes() {    su spend(SelectionKey .O P _ WR ITE);
   }

 pu b lic void  w ake upWr i t es(){
     wakeu p(Sele c ti on Key.OP_ WR ITE);   } 

   pu b licboolea n isWrit eResu m ed() {
      return isResu m ed ( S el e ctio nKe y.OP_WRITE) ;
  }
   p ub lic voidawait Wr i ta b le() throws IOExcep ti on {
      Xnio.checkB lockingAll o w e d();
     if (isWriteShutdo wn())  {
          retu rn;
       } 
       S e lectorUt ils .aw ait ((N i o Xn io)getWorker( ) . getX ni o(), so cke tChanne l,Sel ect ion Ke y.OP_WRIT E);
   }
  p ubl ic vo i d awaitW ri tab le (fi nal l o ng tim e, fi nalTi me U nit  timeUn i t) t hrow sIO Exce pti on  {
     Xn io.chec kBlocking All o wed( ); 
      if (isWriteSh ut down()) {        r eturn;
       }
        Select o rUtils. awa it((N ioXn io)getWor ker ().get Xni o (), so cketCh annel ,Sel e c tionK e y .O P_W RI TE, time,t i meU nit); 
   } 

    p ublic XnioIoThread get WriteThread()  {    ret u rn get Wo r ker T h read();
    }
    public  v o id  setWriteR e ady Ha ndler(f inal Wr iteRe a dyHandl er handle r) {
      wr i t eRe adyHandler  = handl er;
    } 
   / /Readmet hods
   i nt ge tAndSe t Rea dTime out(in tnewVal ) {
      ret urn readTimeoutUpdater. getAnd Set(t his , newVal) ;
  } 

    int  get ReadTimeou t()  {      r eturn  rea d Ti meo u t;
   }    priva t evoi d ch eckReadTime o u t 
 harmful_just to_swallow it
  _ __ __  _}
  _   _ } catch_(ClosedChannelException_ignored) {
        } finally {
  __ ___    writeTerminated();
_    _ _}
    }

   _public_void truncateWrites() throws_IOException {
       _terminateWrites();
    }

 _  void_writeTerminated()_{
_   _   final WriteReadyHandler writeReadyHandler_= this.writeReadyHandler;
    _   if (writeReadyHandler!= null) try_{
     _    _ writeReadyHandler.terminated();
_    _  }_catch (Throwable_ignored) {}
 _  }

   _public boolean isWriteShutdown()_{
     __ return connection.isWriteShutdown();
___ }

_  _public_void resumeWrites()_{
_     __resume(SelectionKey.OP_WRITE);
    }

  _ public void suspendWrites()_{
_   _   suspend(SelectionKey.OP_WRITE);
 _  }

   _public void_wakeupWrites() {
_       wakeup(SelectionKey.OP_WRITE);
   _}

    public boolean_isWriteResumed() {
  _ __  return_isResumed(SelectionKey.OP_WRITE);
_ _ }

    public void_awaitWritable() throws_IOException {
    _   Xnio.checkBlockingAllowed();
__     _if (isWriteShutdown()) {
   _    ___ return;
   _    }
 _  _   SelectorUtils.await((NioXnio)getWorker().getXnio(), socketChannel, SelectionKey.OP_WRITE);
 __ }

    public_void_awaitWritable(final long time, final TimeUnit timeUnit)_throws_IOException_{
    _   Xnio.checkBlockingAllowed();
  _     if (isWriteShutdown()) {
 _  _    ___return;
        }
 _ _  _ SelectorUtils.await((NioXnio)getWorker().getXnio(), socketChannel, SelectionKey.OP_WRITE, time, timeUnit);
    }

_   public XnioIoThread getWriteThread() {
_       return getWorkerThread();
  _ }

    public void setWriteReadyHandler(final_WriteReadyHandler handler) {
    _   writeReadyHandler_=_handler;
    }

  __//_Read_methods

  _ int getAndSetReadTimeout(int_newVal) {
 _ _  _ return_readTimeoutUpdater.getAndSet(this, newVal);
 __ }

    int getReadTimeout() {
        return readTimeout;
 _  }

   _private void checkReadTimeout