public Entry < K , V > insertWithinLock ( Entry < K , V > e , int _hash , int _keyValue ) { K key = e . getKeyObj ( ) ; int si = _hash & LOCK_MASK ; Entry < K , V > f ; Object ek ; Entry < K , V > [ ] tab = entries ; if ( tab == null ) { throw new CacheClosedException ( cache ) ; } int n = tab . length , _mask = n - 1 , idx = _hash & ( _mask ) ; f = tab [ idx ] ; while ( f != null ) { if ( f . hashCode == _keyValue && ( ( ek = f . getKeyObj ( ) ) == key || ( ek . equals ( key ) ) ) ) { return f ; } f = f . another ; } e . another = tab [ idx ] ; tab [ idx ] = e ; segmentSize [ si ] . incrementAndGet ( ) ; return e ; }
Insert an entry . Checks if an entry already exists .