private ReadersEntry addState ( ) { final AtomicInteger state = new AtomicInteger ( SRWL_STATE_NOT_READING ) ; final ReadersEntry newEntry = new ReadersEntry ( state ) ; entry . set ( newEntry ) ; readersStateList . add ( state ) ; readersStateArrayRef . set ( null ) ; return newEntry ; }
Creates a new ReadersEntry instance for the current thread and its associated AtomicInteger to store the state of the Reader