public final synchronized boolean reserveId ( long id , Object obj ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "reserveId" , new Object [ ] { new Long ( id ) , obj } ) ; boolean reserved = false ; // The id can only be reserved if it // isn't already in the map if ( _idMap . get ( id ) == null ) { _idMap . put ( id , obj ) ; reserved = true ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "reserveId" , new Boolean ( reserved ) ) ; return reserved ; }
Reserve the given id and associate it with the given object . This method should be used during recovery when there is a requirement to create a new object with a specific id rather than the one that is next available .