async io nio channels ClosedSelectorException nio channels SelectionKey nio channels Selector nio channels spi SelectorProvider TreeSet concurrent ConcurrentLinkedQueue concurrent TimeoutException TException slf4j Logger slf4j LoggerFactory tasyncclientmanager logger logger loggerfactory.getlogger tasyncclientmanager.class.getname selectthread selectthread concurrentlinkedqueue tasyncmethodcall pendingcalls concurrentlinkedqueue tasyncmethodcall tasyncclientmanager this.selectthread selectthread selectthread.start call tasyncmethodcall method texception isrunning texception method.preparemethodcall pendingcalls.add method selectthread.getselector wakeup stop selectthread.finish isrunning selectthread.isalive selectthread selector selector running treeset tasyncmethodcall timeoutwatchset treeset tasyncmethodcall tasyncmethodcalltimeoutcomparator selectthread this.selector selectorprovider.provider openselector this.running this.getid setdaemon selector getselector selector finish running selector.wakeup run running timeoutwatchset.size selector.select nexttimeout timeoutwatchset.first gettimeouttimestamp selecttime nexttimeout system.currenttimemillis selecttime selector.select selecttime selector.selectnow logger.error transitionmethods timeoutmethods startpendingmethods exception logger.error exception transitionmethods selectionkey keys selector.selectedkeys iterator keys.hasnext selectionkey key keys.next keys.remove key.isvalid tasyncmethodcall methodcall tasyncmethodcall key.attachment methodcall.transition key methodcall.isfinished methodcall.getclient timeoutwatchset.remove methodcall closedselectorexception logger.error timeoutmethods tasyncmethodcall iterator timeoutwatchset.iterator system.currenttimemillis iterator.hasnext tasyncmethodcall methodcall iterator.next methodcall.gettimeouttimestamp iterator.remove methodcall.onerror timeoutexception methodcall.getclass methodcall.getstarttime startpendingmethods tasyncmethodcall methodcall methodcall pendingcalls.poll methodcall.start selector tasyncclient client methodcall.getclient client.hastimeout client.haserror timeoutwatchset.add methodcall exception logger.warn exception methodcall.onerror exception tasyncmethodcalltimeoutcomparator tasyncmethodcall compare tasyncmethodcall left tasyncmethodcall left.gettimeouttimestamp right.gettimeouttimestamp left.getsequenceid right.getsequenceid left.gettimeouttimestamp right.gettimeouttimestamp