private boolean optimisticFindFirst ( DeleteStack stack ) { Object q = null ; int v1 = _index . vno ( ) ; int x1 = _index . xno ( ) ; if ( ( v1 & 1 ) != 0 ) return pessimisticNeeded ; synchronized ( this ) { } try { q = getFirst ( stack ) ; } catch ( NullPointerException npe ) { //No FFDC Code Needed. _nullPointerExceptions ++ ; return GBSTree . checkForPossibleIndexChange ( v1 , _index . vno ( ) , npe , "optimisticFindFirst" ) ; } catch ( OptimisticDepthException ode ) { //No FFDC Code Needed. _optimisticDepthExceptions ++ ; return GBSTree . checkForPossibleIndexChange ( v1 , _index . vno ( ) , ode , "optimisticFindFirst" ) ; } if ( v1 != _index . vno ( ) ) return pessimisticNeeded ; _current1 . setLocation ( q , v1 , x1 ) ; _optimisticFindFirsts ++ ; return optimisticWorked ; }
Find first key in index using optimistic locking