private void handleInputQueue ( ) { if ( ! addedQueue . isEmpty ( ) ) { getLogger ( ) . debug ( "Handling queue" ) ; Collection < MemcachedNode > toAdd = new HashSet < MemcachedNode > ( ) ; Collection < MemcachedNode > todo = new HashSet < MemcachedNode > ( ) ; MemcachedNode qaNode ; while ( ( qaNode = addedQueue . poll ( ) ) != null ) { todo . add ( qaNode ) ; } for ( MemcachedNode node : todo ) { boolean readyForIO = false ; if ( node . isActive ( ) ) { if ( node . getCurrentWriteOp ( ) != null ) { readyForIO = true ; getLogger ( ) . debug ( "Handling queued write %s" , node ) ; } } else { toAdd . add ( node ) ; } node . copyInputQueue ( ) ; if ( readyForIO ) { try { if ( node . getWbuf ( ) . hasRemaining ( ) ) { handleWrites ( node ) ; } } catch ( IOException e ) { getLogger ( ) . warn ( "Exception handling write" , e ) ; lostConnection ( node ) ; } } node . fixupOps ( ) ; } addedQueue . addAll ( toAdd ) ; } }
Handle any requests that have been made against the client .