private void finishInsert ( InsertNodes point , InsertStack stack , Object new1 ) { Object insertKey = new1 ; if ( point . positionNode ( ) != null ) { GBSNode p = point . positionNode ( ) ; int ix = point . positionIndex ( ) ; if ( point . rightSide ( ) ) insertKey = p . insertByRightShift ( ix , insertKey ) ; else insertKey = p . insertByLeftShift ( ix , insertKey ) ; } /* If the insert point is at the right-most slot in a full node */ /* then we migrate the new key into the fringe. */ Object migrateKey = null ; if ( point . insertIndex ( ) == point . insertNode ( ) . topMostIndex ( ) ) migrateKey = insertKey ; else /* Insert within existing node */ migrateKey = /* Which may migrate a key out of it */ point . insertNode ( ) . insertByRightShift ( point . insertIndex ( ) , insertKey ) ; insertFringeMigrate ( stack , point . insertNode ( ) , migrateKey ) ; }
Do the write phase of the insert .