private synchronized boolean pessimisticInsert ( InsertStack stack , Object new1 ) { _vno ++ ; if ( ( _vno & 1 ) == 1 ) { if ( root ( ) == null ) { addFirstNode ( new1 ) ; _population ++ ; } else { InsertNodes point = stack . insertNodes ( ) ; findInsert ( point , stack , new1 ) ; if ( point . isDuplicate ( ) ) stack . markDuplicate ( ) ; else { finishInsert ( point , stack , new1 ) ; _population ++ ; } } } synchronized ( stack ) { } _vno ++ ; _pessimisticInserts ++ ; return optimisticWorked ; }
Pessimistic insert into a GBS Tree .