boolean addAndCheckIfReady ( int event ) { int b = bits . addAndGet ( event ) ; boolean isReady = b == READY_WITHOUT_SIGNAL || b == READY_WITH_UNNECESSARY_SIGNAL || b == READY_WITH_SIGNAL ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "addAndCheckIfReady " + event + ", polling state: " + b + ", " + isReady ) ; return isReady ; }
Add an event and then check if we are ready for polling .