void function ( SelectionKey arg0 ) { if ( selectorThread == Thread . currentThread ( ) ) { arg0 . interestOps ( READ_WRITE_OPS ) ; } else { selectionKeyQueue . add ( arg0 ) ; wakeup ( ) ; } }
fastcore use this method to register the wish of changing interest operations.we will change the interest operations into both read and write . if the change is invoked in the selector thread , we change it directly . otherwise , we save it into the queue and wakeup the selector to register the change . concode_field_sep int READ_WRITE_OPS concode_elem_sep AtomicBoolean awaked concode_elem_sep ConcurrentLinkedQueue<SelectionKey> selectionKeyQueue concode_elem_sep Selector selector concode_elem_sep Thread selectorThread concode_field_sep void changeAllInterestOps concode_elem_sep Selector getSelector concode_elem_sep void wakeup